I\'m making a TreePanel that looks like this:
At the moment I have it \"mo
I have a very similar problem, and while I haven't gotten it to work completely like I want it to, it mostly works. I have autoLoad: false
and added this event handler:
beforerender: function(comp, opts) {
var node = this.getRootNode();
node.appendChild({test: 'Recent', id: 'recent', expandable: true, expanded: false});
node.appendChild({text: 'Current', id: 'current', expandable: true, expanded: false});
node.appendChild({text: 'All', id: 'all', expandable: true, expanded: false});
}
The 3 immediate children of the root are static, then the proxy makes a request to populate them when I expand them (passing the appropriate id).
I also had to suppress the root node from loading with a listener on the store:
listeners: {
beforeload: function(store, operation, opts) {
if (operation.node.data.id == 'root') {
return false;
}
}
},
Hope this helps. It seems like there should be a better way!?!