on 01-21-2011 11:33 AM
Hi,
I need to generate at runtime the editor of a Cell Variant in a column of a Table (e.g. it may be a TextEdit or a DropDownByKey).
I need to configure the parameter mapping in order to pass to the editor's OnChange event handler the current element selected in the table (the NodeElement associated to the selected row).
Can someone suggest me how to do that?
Thank you,
Pietro
This is an image showing the mapping I need to make (in this case the mapping is made statically via the Netweaver interface):
<a href="http://fumpr.com/share-3457_4D396E3B.html">[img]http://fumpr.com/image-3457_4D396E3B.jpg[/img]</a>
DropDownBy* has no onChange event. For TextEdit, do something like
IWDTextEdit editor = view.createElement(IWDTextEdit.class, "editorID");
editor.setOnChange(wdThis.wdGetEditorValueChangedAction());
editor.mappingOfOnChange().addSourceMapping(IWDTextEdit.IWDOnChange.NODE_ELEMENT, "row");
This assumes you have created an action "EditorValueChanged" with a parameter "row" whose type is the context element type used to fill the table. You can also create the action programmatically if needed, but at least the event handler method must be created at design-time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Below are the steps to achieve parameter mapping,
1. To the OnChange event handler add an input parameter called "selectedElement" of type IWDNodeElement
2. Add the below mentioned code in the wdDoModify() method
if(firstTime){
IWD<UIElement> uiElement= (IWD<UIElement>) view.getElement("ID");
uiElement.mappingOfOnChange().addSourceMapping("nodeElement", "selectedElement");
}
Assuming "ID" is the id of the UI element added.
3. In the event handler created add the below line of code to get the element
IPrivate<VeiwName>.I<NodeElement> element = (IPrivate<VeiwName>.I<NodeElement>) selectedElement;
Regards,
Vishweshwara P.K.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.