Skip to content

Instantly share code, notes, and snippets.

@codylindley
Created June 8, 2012 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save codylindley/2896170 to your computer and use it in GitHub Desktop.
Save codylindley/2896170 to your computer and use it in GitHub Desktop.
<div data-dojo-type="dojo.data.ItemFileReadStore" data-dojo-id="continentStore"
data-dojo-props="url:'{{dataUrl}}/dijit/tests/_data/countries.json'"></div>
<div data-dojo-type="dijit.tree.ForestStoreModel" data-dojo-id="continentModel"
data-dojo-props="store:continentStore, query:{type:'continent'},
rootId:'continentRoot', rootLabel:'Continents', childrenAttrs:'children'"></div>
<div data-dojo-type="dijit.Tree" id="mytree"
data-dojo-props="model:continentModel, openOnClick:true">
<script type="dojo/method" data-dojo-event="onClick" data-dojo-args="item">
alert("Execute of node " + continentStore.getLabel(item)
+", population=" + continentStore.getValue(item, "population"));
</script>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment