cancel
Showing results for 
Search instead for 
Did you mean: 

How to add link to the tree element

Former Member
0 Kudos

we had developed different UI screens... now for all those i have individual addresses....

now i have to link all those addresses to a Tree elements...

how to add a link to one particular element in the tree so that if i click on that tree element corresponding link should open in the page

waiting for the reply ASAP

Accepted Solutions (0)

Answers (2)

Answers (2)

monalisa_biswal
Contributor
0 Kudos

//First of all create a parameter of type treeElement(element of ur context node )

in the onaction method of ur tree.

//Add parameter mapping on domodify method.

if(firstTime)

{

IWDTreeNodeType nodeType = (IWDTreeNodeType )view.getElement("node");//"node" name of tree nodetype

nodeType.mappingOfOnAction().addSourceMapping("path","element");//"element" name of parameter in onaction method

}

//take a value attributein ur context node to hold the url

//In the onactionmethod retrieve the url of selected tree node element and pass it to the createexternalwindow method

public void onActionselect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, ltil.plm.com.wdp.IPrivateMysimplenavigatorView.ITreeNodeElement element )

{

//@@begin onActionselect(ServerEvent)

IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(element.getLinkurl(),"URLWin",false);

window.open();

//@@end

}

Former Member
0 Kudos

hi sunil,

you can do it using the iFrame uielemnt. create a context attribute and set the Source property of the iframe to this. in the OnSelect property of the tree element set the context attribute of i frame to the url u want.

regards

rahul