Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need help expanding a tree

I have the following Context node

SiteTree (0..n)

--> ChildNode (recursive SiteTree)

|--> Name (string)

|--> ID (string)

|--> Expanded (boolean)

The ChildNode's expanded property is set to the SiteTree.Expanded value.

I am calling an RFC to create a new record, then calling another BAPI to refresh this node list.

What I want to do is after rebuilding this node, I want to expand the tree to a specific SiteTreeElement based on it's ID. I have built the recursive function that locates the appropriate SiteTreeElement and I set Expanded to true for this element. However this does not expand the tree, it is fully collapsed.

Any help would be greatly appreciated.

Former Member
Former Member replied

Easiest solution is perhaps to just select the specific node using setTreeSelection(element). The Tree has a built-in functionality to always expand the path to the tree selection.


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question