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");
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.
Ulrich Hullen replied
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.