cancel
Showing results for 
Search instead for 
Did you mean: 

tree structure with the check boxes

Former Member
0 Kudos

Hi Experts,

I need a tree structure with the check boxes.If I am selecting the parent node the entire tree structure under that should be selected automatically.That strucutre should be saved in an array.Can you please help me for that?Please give step by step procees.

Regards

Nutan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To Acheive the following

"I need a tree structure with the check boxes"

create a recursive node

add an attribute of type boolean and map this to the check box

once your recursive node is populated with data and bind to tree , use the tree by nesting ui element for the tree.

"If I am selecting the parent node the entire tree structure under that should be selected automatically"

Create an event handler for the check box.

if checked recusively set the attribute value to true for the attribute bound to the check box.

"That strucutre should be saved in an array"

While iterating try to add this as part of the array.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks for the reply.I have created an attribute under a recursive node.But unable to follow you

"once your recursive node is populated with data and bind to tree , use the tree by nesting ui element for the tree "

after that.I have created an event handler also for the checkbox.Please provide some codes if possible.

Needs urgent help.

Regards

Nutan

.

Former Member
0 Kudos

Hi Experts,

Please help me.I need the codes for this.

Regards,

Nutan

Former Member
0 Kudos

Hi Nutan,

First of all, can u please tell me , why u want to use a check box with the tree??

Apart from that check this doc, u can find the code, context structure as well as event mapping

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tec...

regards

Sumit

Former Member
0 Kudos

Hi sumit,

I need the check box with the tree so that whatever I select will be saved as a new arraylist.The tree structure is the general structure but according to my requirement I want to select the nodes.

Like example:

A---A1,A2,A3

A1--B1,C1

A2--B2,C2

If I select the A1,A2 then the entire structure of A1 and A2 has to be selected and saved as a new arraylist.Thanks for the documents

regards

Nutan

Former Member
0 Kudos

Hi,

To get the node of a selected element you can use the following code

IWDNodeElement nodeElement = wdContext.currentParentElement();

IWDNode node = nodeElement.node();

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Nutan,

Check this thread

regards

Sumit

Answers (0)