cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the parent name in the hierarchy

Former Member
0 Kudos

Hi Colleagues.

Im working on with java webdynpro by showing hierarchical data.

When I select a leaf item, I should get the possible parent items.

For Ex:

A

-


B

-


C

|

-


D

When I select D, I need to get the information as A-B-C-D.

How can I acheive this?

Thanks

Rakesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try to use this method. Hope it will help.

wdContext.nodechild().getNodeInfo().getParent();

Regards

Jeetendra.

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Rakesh

You can go up to the root using the following methods:

IDNode dNode = dElement.node();
IWDNodeElement cElement = dNode.getParentElement();
IWDNodeElement bElement = cElement.node().getParentElement();
...

BR, Siarhei