We need to have some specified tree node open when loading a portlet.
My async tree is backed by the LazyNodeTreeContentProvider class.
I have tried to do it with the setOpenIds() method and found that it works perfectly for the root node, but it fails for the children.
Also tried to force the nodes to load by calling lazyTree.setRowById() and lazyTree.getCurrent().getChildren() but still it doesn’t work.
How can I do this?
The easiest solution would be to set the initialDepth to a larger number (1 or 2) on the tree control. However, this might fetch too many children.
To open a specific node on the client side you can script the tree itself and force the Tree to load a branch. Have a look in the online docs at the CAF.Tree.Model section.
The docs discuss how you can test for whether a node has children, whether they’ve been loaded yet, and how to force the node to load children.
Hope this helps.