-
-
Save wycats/2898031 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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