Board Logo

Dynamic building of a tree
Jim - 10/22/2003 at 04:10 PM

I'm using the tree w/ a Java app and the data is loaded dynamically. I've got the root node, and when clicked, the next level gets loaded. So with each click, I actually rebuild the entire tree.
My problem is the child nodes. When they are initially displayed, they show up as leafs. So I need to click each leaf twice to get the data under it to display. What I would like to see happen, is when I click the leaf, for it to load and automatically expand. I've defined a function for onItemOpen, and thought I would be able to use the afterInit option to then expand the node, but I can't seem to get it to function correctly. It does seem to have the necessary info for me to expand the the node.
I am new to javascript, but it seems I'm making this harder than it should be.

Any help would be appreciated.


rock - 10/23/2003 at 07:26 AM

You could do either of the following:
- Define folder-like icons for each leaf supposed to be opened (use item scope settings) and define onItemSelect handler where you could decide whether to "open" the item.
- Contact us at http://www.softcomplex.com/support/, and our programmers provide you with customized control where you could force leaf to act and look like a node.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/