cancel
Showing results for 
Search instead for 
Did you mean: 

Create dynamic Childnode in tree

Former Member
0 Kudos

Hi,

I like to create a childnode in a tree dynamic(via Button).

This means i need the current selected node - but I have no idea how to get them.

IPrivate<Viewname>.I<Nodename> currnode = wdContext.nodePrognoseExplorerContent().get<Nodename>ElementAt(wdContext.node<Nodename>().getLeadSelection()));

But this returns everytime the root node.

Can anyone help?

Thanks Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try IWDNode.getTreeSelection().

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Armin,

(sorry that i din't open a new case)

thanks it works, but in this case a new problem comes up:

Following situation:

-Node1

-Node11

-Node12

-Node2

Situation Node12 is selected,

Target: I try to remove the Node11 and Node12.

Therefor I get the parent of Node12 - and vola Node1 is the result -

Now I try -

node1.node().removeElement(node1.node.get<NodeName>ChildElementAt(1))

But the rturn value is always false.

Sorry for this dummie questions -

Stefan