[dojo-contributors] TreeGrid enhancement for 1.6 - lazy loading for children rows

Kris Zyp kzyp at dojotoolkit.org
Fri Oct 1 15:21:26 EDT 2010



On 10/1/2010 11:34 AM, Jonathan Bond-Caron wrote:
> There's an alternative which I've put online here:
> http://bugs.dojotoolkit.org/attachment/ticket/11537/data_model.patch
>
> In short, it would be practical to separate to 'storage api' and the 'model
> api'.
>
> For storage:
>
> In SQL terms:
> SELECT, UPDATE or INSERT, DELETE, ~ SELECT * FROM information_schema.columns
>
> In Dojo terms:
> query() or get(), put(), remove(), getModel()
>
>> On 9/29/2010 3:25 AM, Bill Keese wrote:
>>> A getChildren(....., {start:*, count:*, ...}) method sounds 
>>> reasonable. Would that method be on the store or on the item?
>>> I've been assuming that getChildren()'s return value is similar to 
>>> store.query()'s.
> With the data model approach, you would use ~
>
> dm = store.getModel(); 
>
> if( dm.getProperty('hasChildren', itm) ) {
>   // create a new data store for node 'itm' that will lazy load children or
> fetch right way...
>   
> }

What is the advantage to having extra methods on a model instead of the
store?

Kris


More information about the dojo-contributors mailing list