PDA

View Full Version : Help: Simple question on reloading a tree



Joe Kuan
11 Oct 2010, 2:56 AM
Hi all,

I have a TreeGrid with a TreeLoader object and would like to reload the data from the web server. How do I do that?

Something like this? treeloader.load(treepanel.getRootNode(), { }, this);

Thanks
Joe

Condor
11 Oct 2010, 3:01 AM
I would use:

treepanel.getRootNode().reload();

surfyogi
1 Nov 2010, 10:49 AM
As of which API version?
Doesn't seem to work for me in v3.2.1..

thx

surfyogi
1 Nov 2010, 11:08 AM
Please correct my disconnect if I'm inccorect:

but the node returned by getRootNode doesn't appear to have a reload() method, leading me to believe it is an object type TreeNode, NOT AsyncTreeNode, and thus does not have a reload() method?

So in this case, I'd just like a simple pattern that will force the tree to reload from the root node.. as everything I try seems to fail, as the original poster described also.

thanks,
Jeff-

Condor
1 Nov 2010, 11:32 AM
You specified the root node yourself, so you should know if it is a TreeNode or an AsyncTreeNode.