on 2006 Sep 28 8:05 PM
Hello All,
I have a WD table in which one of the columns is a link(LinkToAction). The data in the column is bound to the view context and is also mapped to an OnAction method.
I would like to extract the value of the link when the user selects the link.
I tried 2 ways:
1)
wdContext.currentListDataElement().getSalesOrderNo();
2)
int i = wdContext.nodeListData().getLeadSelection();
String val = wdContext.nodeListData().getListDataElementAt(i).getSalesOrderNo();
But for some reason the selection of the link does not change the lead selection of the row in the table. The value returned by the above methods does not correspond to the link selected but returns the value of the Sales Order where the row is selected.
Any ideas what I am doing wrong?
Thanks
Asheesh
To the action assigned to the link, add a parameter "row" of type I<Node>Element, where <Node> is the table's data source node.
Define an event parameter mapping for the implicit "nodeElement" parameter:
Either using the mapping editor or by code:
void wdDoModifyView(...)
{
if (firstTime)
{
IWDLinkToAction link = (IWDLinkToAction) view.getElement("Id-of-link");
link.mappingOfOnAction().addSourceMapping
(
"nodeElement",
"row"
)
}
}
Then the parameter "row" will contain the node element corresponding to the table row of the clicked link.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In NW04, the table's lead selection was automatically changed when the link was clicked. But this proved to be a performance problem in some situations.
There is only this "nodeElement" parameter which is implicit. All other event parameters are documented in the Javadoc of the mappingOf<event>() methods and in the new IWD<event> interfaces.
The mapping editor can be accessed via the outline view of the view designer: Right-click on a UI element node and select "Parameter mapping".
Armin
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.