Zyclops
15 Oct 2007, 10:50 PM
Is there a way to dynamically load the root node of a tree, currently I have:
var tree = new Tree.TreePanel({
el:'org-tree',
autoScroll:true,
animate:true,
selModel: false,
containerScroll: true,
loader: new Tree.TreeLoader({
dataUrl:'/access/tree_data/' + this.emplid,
preloadChildren: true
}),
root: new Tree.AsyncTreeNode({draggable:false,expanded:false,id:'1'})
});
Which statically loads the root node and the dynamically loads it's children, I'd like to just make a call and use that as the entire tree, but I haven't come across any examples that do that.
In case you we're wondering, I need to pass specific class settings which depend on the rails application that it queries the tree from.
var tree = new Tree.TreePanel({
el:'org-tree',
autoScroll:true,
animate:true,
selModel: false,
containerScroll: true,
loader: new Tree.TreeLoader({
dataUrl:'/access/tree_data/' + this.emplid,
preloadChildren: true
}),
root: new Tree.AsyncTreeNode({draggable:false,expanded:false,id:'1'})
});
Which statically loads the root node and the dynamically loads it's children, I'd like to just make a call and use that as the entire tree, but I haven't come across any examples that do that.
In case you we're wondering, I need to pass specific class settings which depend on the rails application that it queries the tree from.