Skip to content

Instantly share code, notes, and snippets.

@codylindley
Created June 8, 2012 15:29
Show Gist options
  • Save codylindley/2896170 to your computer and use it in GitHub Desktop.
Save codylindley/2896170 to your computer and use it in GitHub Desktop.

Revisions

  1. codylindley created this gist Jun 8, 2012.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <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>