Reload Tree Panel
I saw the mytreeloader extension, but I'm not sure if that's what I need.
Here is my code
var navpanel = new Ext.tree.TreeLoader({
dataUrl:'json.php'
});
var treePanel = new Ext.tree.TreePanel({
id: 'tree-panel',
title: 'Navigation',
region:'west',
width: 200,
minSize: 150,
autoScroll: true,
margins: '0 5 0 0',
rootVisible: false,
lines: false,
useArrows: true,
loader: navpanel,
root: new Ext.tree.AsyncTreeNode()
});
I simply want to reload the treepanel from the same source.
Is this doable? I feel like there should be a reload function somewhere, like we have with the data store.
Thanks!
Thanks!
YESS!! PERFECT THANK YOU!! :-)
for treeloader docs.
load( Ext.tree.TreeNode node, Function callback ) : void Load an Ext.tree.TreeNode (http://localhost/ext-2.1/docs/output/Ext.tree.TreeNode.html) from the URL specified in the constructor. This is called automatically when a node is expanded, but may be used to reload a node (or append new children if the clearOnLoad (http://localhost/ext-2.1/docs/output/Ext.tree.TreeLoader.html#clearOnLoad) option is false.) Parameters:
node : Ext.tree.TreeNode
callback : Function Returns:
void
#If you have any other info about this subject , Please add it free.# |