PDA

View Full Version : reloading tree node



hazimdikenli
23 Sep 2009, 1:52 AM
Hello,
I have a TreePanel


var tree = new Tree.TreePanel({
useArrows: true,
autoScroll: true,
animate: true,
enableDD: true,
containerScroll: true,
border: false,
id: 'treepanel',
// auto create TreeLoader
dataUrl: 'TreeLoader.ashx',
listeners: {
contextmenu: onCtxMenu
},
root: {
nodeType: 'async',
text: 'Root',
draggable: false,
id: 'src'
}
});

I have a context menu item for reloading the node.
And it executes the code below.

function onReloadNode() {
var treePanel = Ext.getCmp('treepanel');
var selectedNode = treePanel.getSelectionModel().getSelectedNode();

selectedNode.reload(Ext.emptyFn);
}
But this does not reload any child nodes. It changes collapse/expand states of the child nodes.

Is reload supposed to reload the child nodes, if so, what am I doing wrong?
Thanks in advance