Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Parameter mapping

Hi developers

I am trying to use test application on tree in WD. I am trying to implement test application on tree's ( available on code samples in SDN ).

In this project parameter mapping has been used .

In domodify view following code has been written

IWDTreeNodeType treeNode = (IWDTreeNodeType) view.getElement("TheNode");

treeNode.mappingOfOnAction().addSourceMapping<b>("path</b>", "selectedElement");

treeNode.mappingOfOnLoadChildren().addSourceMapping<b>("path",</b> "element");

The above line is necessary to create parameter mapping from parameter "path" to parameter "element".

but I am not able to understand from where we are getting client side parameter

<b>"path" </b> .

also I need to know why we put parameter mapping code in do modify view knowing that it will only be executed only first time.


Hi Abhay,

well, the TreeNodeType has 2 event parameters automatically declared: <b>Path</b> and <b>NodeElement</b>.

In the example that you have given there, the event parameter <b>Path</b> is mapped to the action parameter <b>selectedElement</b> and <b>element</b>, depending on the event that is triggered.

so in your actionEventHandler methods (onActionXxxx) there should be an additional action parameter (<b>selectedElement</b> or <b>element</b>, respectively) that contain the event parameter's value at runtime.

The value of those 2 event parameters are determined by the runtime environment whenever the event is triggered, I don't think you have control over that. But of course you can take some action based on the value of that action parameter within the actionEventHandler.

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question