Changes between Initial Version and Version 1 of Ticket #10569


Ignore:
Timestamp:
Dec 29, 2009, 8:51:51 AM (10 years ago)
Author:
bill
Comment:

Thanks for the ticket.

It looks like your code will fail in the case where some of the children are already loaded and some of them aren't. Probably a rare case but we should handle it.

My question is why the current code isn't working with JsonRestStore. Can you supply a test case?

In the code below (for !jsonRestStore, you are saying that item != item2

if(!store.isItemLoaded(item)){
    store.loadItem({
	item: item,
	onItem: function(item2){  // item2 != item1 ??? }
    }
}

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10569

    • Property Summary changed from dijit.Tree does not work when working with dojox.data.JsonRestStore to Tree: does not work when working with dojox.data.JsonRestStore
  • Ticket #10569 – Description

    initial v1  
    11Hi,
    2   I find a bug in dijit.tree.TreeStoreModel which causes dijit.Tree not working when associated with dojox.data.JsonRestStore. This bug causes that child items lazily loaded by store are not correctly updated to model. Each item in childItems at line 162 in dijit.tree.TreeStoreMode source code stands for the set of children to be loaded when children attribute is set to {$ref: ...} for lazily loading. That is, an item in childItems could fetch back a set of items. It is this set of items supposed to be updated to model. The following is the change I have done to the source code. For the original mail I post to dojo-interest, see http://mail.dojotoolkit.org/pipermail/dojo-interest/2009-December/041883.html.
     2  I find a bug in dijit.tree.!TreeStoreModel which causes dijit.Tree not working when associated with dojox.data.!JsonRestStore. This bug causes that child items lazily loaded by store are not correctly updated to model. Each item in childItems at line 162 in dijit.tree.!TreeStoreMode source code stands for the set of children to be loaded when children attribute is set to {$ref: ...} for lazily loading. That is, an item in childItems could fetch back a set of items. It is this set of items supposed to be updated to model. The following is the change I have done to the source code.
    33
     4For the original mail I post to dojo-interest, see http://mail.dojotoolkit.org/pipermail/dojo-interest/2009-December/041883.html.
     5
     6{{{
    47               var children = [];
    58line 158                      // still waiting for some or all of the items to load
     
    1114                    }
    1215                }
    13  
     16 }}}