PDA

View Full Version : TreeNode cascade function does not find unrenderd children



forumuser1080
22 Mar 2012, 9:45 AM
I have a treepanel that is loaded into memory when I get the root. I do not expand all nodes. When I call:



tree.getRootNode.cascade(...);


It only cascades into folder nodes if they have been rendered.

findChildBy method works the same way.

Is this intended behavior? Do I need to tell all my nodes (when they are loaded that they are not remote), i.e. that I have already loaded the entire tree.

I am using version 3.2.1 it that matters.

Thanks.

mitchellsimoens
22 Mar 2012, 12:35 PM
is the data all there or are you using async node?

forumuser1080
22 Mar 2012, 6:25 PM
You are correct. I grabbed all nodes from the server but I was loading the children into asyc nodes. This worked great as each 'folder expand' did not hit the server but the cascade did not think all nodes were loaded.

I see that there is a preloadChildren option on the TreeLoader. Can someone explain in more detail how this works. I.E. does this make one call for each 'folder' to the server? I want the entire tree loaded but think that it might be faster to hit the server/database once for all nodes rather than a bunch of times for each folder.