Still working on my Tree, irc’s magic chamber (#dojo) gave me a solution I tend to forget from times to times related to extending some of dojo’s functions (credits dmachi, thanks man 😉

Here it is :

myStore = new dojox.data.JsonRestStore({target:"/objects/", labelAttribute:"Task_Action"});

myModel = new dijit.tree.ForestStoreModel({
store: myStore,
deferItemLoadingUntilExpand: true,
query: {object:'Task'},
rootLabel:'test test'

});

dojo.extend(dijit.Tree, {_createTreeNode: function(args){

console.log("this is cool stuff");
console.log("_createTreeNode: ", args);
return new dijit._TreeNode(args);

}}
);

myTree = new dijit.Tree({
id: "myTree",
model: myModel,
persist: false,
label:'test'
});

dojo.byId("container").appendChild(myTree.domNode);
myTree.startup();

Advertisements