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

Simon simon.speich at gmail.com
Fri Apr 9 02:24:03 EDT 2010


Hi Florian

I have basic example of a tree based on a jsonreststore here
http://www.speich.net/articles/dojo-jsonreststore.php
The link to rename a node in the tree using a PUT might help you.

Good luck
Simon

On Apr 8, 4:32 pm, Florian Klucke <fklu... at digicult.uni-kiel.de>
wrote:
> 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/diji...
> > : 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
>
>
>
> _______________________________________________
> FAQ:http://dojotoolkit.org/support/faq
> Book:http://docs.dojocampus.org
> Dojo-inter... at mail.dojotoolkit.orghttp://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


More information about the Dojo-interest mailing list