[Dojo-interest] Reload of lazy loaded dijit.Tree / dojox.data.JsonRestStore

Florian Klucke fklucke at digicult.uni-kiel.de
Thu Apr 8 10:32:57 EDT 2010


Hi all,

I'm becoming desperate on this tree-reload-thing. My situation is still 
the same as in february: I have a lazy-loaded dijit.tree with a 
ForestStoreModel and a JsonRestStore as datastore. This tree is used to 
display a hierarchy of some entities in my application and to navigate 
to a síngle entity (onClick). The entities are persisted in a database 
in the backend and read by the datastore's get-request.

Because the user (or any other user of the application) has the 
possibility to change this hierarchy I want to refresh the tree/store to 
show the last changes in the tree every time a user saves an entity.

So the question is: How do I call a tree.reload() or tree.model.reload() 
or tree.model.store.reload() to refresh all visible (already 
lazy-loaded) subnodes???

Thanks,

Florian

Am 11.02.2010 11:19, schrieb Florian Klucke:
> Hi Kris,
>
> thanks for your answer. Do you think of a simple "store.fetch();" 
> without any query? This does not work for me.
>
> Lets take your example from the docs at 
> http://download.dojotoolkit.org/release-1.4.0/dojo-release-1.4.0/dijit/tests/Tree_with_JRS.html 
> : What I need is a button which onClick refreshes all opened (=> 
> already lazy-loaded) treenodes. In my opinion this would require a 
> "myStore.fetch({query: 'treeTestRoot'});" AND "myStore.fetch({query: 
> 'node1.1'});", am I right? What if there would be 20 already openend 
> treenodes?
>
> So the question is: How do I make something like "myStore.fetch();" or 
> "myStore.requery();" clear to the store?
>
> Thanks and regards,
>
> Florian
>
> Am 10.02.2010 20:13, schrieb Kris Zyp:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> If you do a store.fetch, it should trigger a request, and any data
>> returned from the server should update (based on the object ids) the
>> JRS cache and trigger notifications.
>> Kris
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20100408/2b379784/attachment.htm 


More information about the Dojo-interest mailing list