11
rated 0 times
[
16]
[
5]
/ answers: 1 / hits: 17881
/ 13 Years ago, wed, march 23, 2011, 12:00:00
I would like to know how ot update the data of the dojo.dijit.tree component dynamically. At the moment I'm creating the tree using dojo.data.ItemFileReadStore and dijit.tree.ForestStoreModel. Once I create the tree, I would like to reload it periodically with new JSON data.
This is how I create the tree at the moment:
<div dojoType=dojo.data.ItemFileReadStore jsId=myStore url=getJSONResult></div>
<div dojoType=dijit.tree.ForestStoreModel jsId=myModel store=myStore query={type:'cat'} rootId=myRoot rootLabel=Data childrenAttrs=children></div>
<div dojoType=dijit.Tree model=myModel labelAttr=sname label=Data />
Thanks in advance.
More From » dojo