on 10-16-2008 3:47 PM
Hi all,
I've created a TreeTable similar to the TreeTable in this tutorial:
By default the tree is not expanded and looks like this:
http://img519.imageshack.us/my.php?image=11kc7.jpg
i want to expand the first level so the TreeTable will look like this:
http://img363.imageshack.us/my.php?image=22oi3.jpg
I tried to set the 'expanded' property of the 1st element to 'true' but all it does is changing the arrow direction (from left to bottom) without actually expanding the node...
Also, I tried to call the LoadEntries action after populating the context - nothing happens.
Which property do I need to change in order to expand the first level?
Thanks,
Omri
Solved it on my own:
In the wdDoInit I call the load children action with the 1st element as parameter:
onActionLoadChildCatalogEntries(null, wdContext.nodeCatalogEntries().getCatalogEntriesElementAt(0));
in the onActionLoadChildCatalogEntries method I check if this is the first node (by the element's ID) and set the setChildrenLoaded property:
if (element.getID().equalsIgnoreCase("1000")) { // 1000 is the first ID (in my case the first ID is constant)
element.setChildrenLoaded(false);
} else {
element.setChildrenLoaded(true);
}
In the addCatalogEntries method I set the expanded property of root to true:
if (parentId.equalsIgnoreCase("ROOT")) {
newCatalogEntriesElement.setExpanded(true);
}
Not the best solution but it's working
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
unable to open the link for image.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.