on 01-17-2009 2:00 AM
Suppose in a row repeater, I have link to action UI element.
I want to know the code for, which ith element in the row repeater, I selected.
Please help me.
I tried the following, but it doesn't work:
IRowElement ele=wdContext.nodeRow().getRowElementAt(wdContext.nodeRow().getLeadSelection());
ele.get<attribute>();
Edited by: jacky jill on Jan 17, 2009 3:05 AM
For every UI element that lives inside a context-driven parent (like Table, RowRepeater, Tree etc.) there exists an implicit event parameter "nodeElement" that determines the node element corresponding to the table row, row repeater row, tree node etc.
Using event parameter mapping, you can map this event parameter to an action parameter. For example if the RowRepeater is bound to a context node named "Rows", you can add an action parameter "row" of type IRowsElement and use this mapping:
IWDLinkToAction link = (IWDLinkToAction) view.getElement("idOfLink");
link.mappingOfOnAction.addSourceMapping("nodeElement", "row");
/* or in NW >= 7.0: */
link.mappingOfOnAction.addSourceMapping(IWDLinkToAction.IWDOnAction.NODE_ELEMENT, "row");
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin!
Thanks a lot for your reply.
So if the Context node structure is:
Rows (node. This is bound to the source property of the row repeater.)
|-- attr1 (attribute. This is bound to link to action UI element.)
|-- attr2 (attribute. Not visible in the row repeater.)
If there are 5 elements in the Node - "Rows".
On clicking the link to action UI element, I want the corresponding value of "attr2" in a TextView.
What code should I write on the event of the link to action UI to get the corresponding value of "attr2"?
Please help.
Jacky
Edited by: jacky jill on Jan 18, 2009 10:27 AM
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.