ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Need help in identifying child from the tree model

mohit
4 Aug 2010 07:48:47 GMT
4 Aug 2010 07:48:47 GMT

Hello all,

I have a question regarding ZK tree handling. I build my tree with a tree model. (An ArrayList of strings for e.g.) I plan to have a 3 level hierarchy in my tree structure. So i can have an child element as another ArrayList. I have my renderer to display the Strings in the fashion i want on the UI. And map the model and renderer to the Tree component. (I start off with a basic model so the application starts with tree model for 1 item 3 levels)

When i select an item on the tree, i expect to add a child to the selected element.

I can find out the selected tree item with the tree api.

Is there any way to get the index of the selected item, so that I can know which child in my TreeModel to select and add a new child to?