PDA

View Full Version : AsyncTreeNode won't call loader when nested



JohnAgan
12 Feb 2010, 7:30 AM
When I add an AsyncTreeNode, with a loader, inside of another AsyncTreeNode, it never makes the url call. However, when I use the same node in the root, it works. The issue is, I want my root to have two or more nodes that grab content from different sources.

Both examples are inside a TreePanel with no loader.

Doesn't work:


root: new Ext.tree.AsyncTreeNode({
id:'root',
children:[
new Ext.tree.AsyncTreeNode({
id:'newRoot',
loader: new Ext.tree.TreeLoader({
clearOnLoad: true,
url: "http://www.website.com/nodes.json"
})
})
]
})
Does:


root: new Ext.tree.AsyncTreeNode({
id:'newRoot',
loader: new Ext.tree.TreeLoader({
clearOnLoad: true,
url: "http://www.website.com/nodes.json"
})
})