Any help would be greatly appreciated.
Steve
json data:
label: "performance <input type='checkbox' name='report' />",
html:
<div dojoType="dojo.data.ItemFileReadStore" jsId="performanceStore"
data="performanceData">
</div>
<div dojoType="dijit.tree.TreeStoreModel" jsId="performanceModel"
store="performanceStore"
query="{type:'root'}" rootId="performanceRoot" childrenAttrs="children">
</div>
<div dojoType="dijit.Tree" id="performanceTree" style="padding: 3px;"
model="performanceModel" showRoot="true" persist="true">
<script type="dojo/method" event="_createTreeNode" args="args">
var tnode = new dijit._TreeNode(args);
tnode.labelNode.innerHTML = args.label;
return tnode;
</script>
<script type="dojo/method" event="onClick" args="item">
// the node is clicked before
alert("Execute of node " + performanceStore.getLabel(item) );
// the node is unchecked after
</script>
</div>
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Basically, in the PostCreate of the treenode class, you need to do:
var attrs = {'class' : "dijitTreeCheckbox"};
var checkBoxNode = dojo.create('span', attrs);
dojo.place(checkBoxNode, this.contentNode, "first");
Also note that the tree allows you to specify your own treenode class by
overriding:
_createTreeNode: function(/*Object*/ args){
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dijit-Tree-checkbox-tp1613970p1614882.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
Steve
<script type="text/javascript" src="/loadgeneral/js/dojox_checkboxTree.js'></script>