cancel
Showing results for 
Search instead for 
Did you mean: 

tree ui element

Former Member
0 Kudos

hai to every one,

i have one requirement to display fileds under one node like

task

a

m

c

w

when ever click on any of above i need diplay another application (another view).

how to do this plz help me on this.

Accepted Solutions (1)

Accepted Solutions (1)

monalisa_biswal
Contributor
0 Kudos

hi Jagdeesh,

http://help.sap.com/saphelp_nw04s/helpdata/en/c2/abfceffbacd24185ec7af8a3a2e76a/frameset.htm is the link for creation of tree ui element in web dynpro.

http://help.sap.com/saphelp_nw04s/helpdata/en/c2/abfceffbacd24185ec7af8a3a2e76a/frameset.htm explains event handling for tree ui element.

If you know the number of levels in the tree, you can create non-recursive node and bind it to tree ui element. If the number of levels in the tree is not known or more, you can go for recursive node.

onAction (String path)

Specifies the action that is executed when the user selects a node of this type. You can do parameter mapping to know which node is currently selected.

Add one parameter to the onAction event in the events tab of type IWDNodeElement.

In wdDoModify

if(firstTime)

{

IWDTreeNodeType nodeType = (IWDTreeNodeType )view.getElement("<Tree Node>");

nodeType.mappingOfOnAction().addSourceMapping("path","<event parameter name>");

}

In onAction

Check value of the event parameter.

public void onActionSelectNode(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.test.wdp.IPrivateTreeView.ITreeLevel1Element element )

{

//@@begin onActionLoadChildren(ServerEvent)

String id= element.getId();

if (id.equals("a"))

{

//fireplug

}

elseif(id.equals("b"))

{

//fireplug

}

else

{

...

}

//@@end

}

Answers (0)