cancel
Showing results for 
Search instead for 
Did you mean: 

TREE UI ELEMENT

Former Member
0 Kudos

how to display values stored in a tree structure in an input field .

whenever i will select a value in tree , the same value selected should be displayed in an input field , which is in another transperant container .

Accepted Solutions (0)

Answers (4)

Answers (4)

monalisa_biswal
Contributor
0 Kudos

Using Parameter Mapping you can get selected elment at runtime.

To achieve this you have create an action at design time, and bind that action to TreeNodeType.

Create event parameter of type ContextNodeElement (Search for JAVA native Types) for that action .

You have to map this event parameter to the event handler parameter

if (firstTime) {

IWDTreeNodeType nodeType =

(IWDTreeNodeType) view.getElement("<NodeTypeID>");

nodeType.mappingOfOnAction().addSourceMapping(

"path","<parameterName>");

}

In OnAction method you will get selected element's reference from the event handler's parameter.

Get the value of the required attribute from this selected element and set it to input field.

Former Member
0 Kudos

Hi Vijay,

Please follow this tutorial, <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/90dae990-0201-0010-d886-ef4afe418d1e">creating Trees in Web Dynpro (12)</a>

This Tutorial exactly describes what you asked for.

Regards,

Amol

Former Member
0 Kudos

Vijay,

Do you use recursive node for tree or "regular" node/sub-nodes?

VS

Former Member
0 Kudos

Hi Vijay,

Bind the same valueattribute to which the tree is bound to the inputfield !!

Regards, ANilkumar