on 11-13-2008 5:03 PM
Hi All,
I have a table which consists of 3 coumns. To have the Textview cell editor, and the other type Button cell editor. When the user clicks on a button in a row, they will be taken to another view to do some stuff there.
But - please advise how I can determine for which row the button was clicked. Is there perhaps some kind of context mapping i need to do in the wdDoModifyWIndow.. I mean there must be some parameter that is passed by the runtime framework that I can catch to determine for which row this button was checked.
Please helo,
Christiaan
Hi,
I am not very sure of your requirement and why do you want to write it in wdDoModifyView()?
I feel that your requirement is that when you click on the button in a particular row then you need to get the data of the other columns of that particular row and based on that you would populate data in the next view. If this is the requirement then wdContext.current<nodename>Element().get<attribute>() would give your the value of the currently clicked row.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Every event that has been triggered inside a context-driven UI element like Table, RowRepeater, Tree etc. has an implicit event parameter "nodeElement" of type IWDNodeElement. This parameter contains the context element corresponding to the row / tree node / whatever represents the node element.
To use it in an action handler, define an action parameter "row" of type "IWDNodeElement" or "I<DataSourceNode>Element" and map the event parameter to it. Mapping can either be done with the Parameter Mapping Editor (Outline, right-click on Button, select "Parameter Mapping") or by a piece of code in wdDoModifyView():
if (firstTime)
{
IWDButton button = (IWDButton) view.getElement("button_id");
button.mappingOfOnAction().addSourceMapping("nodeElement", "row");
/* or better if available in your version: */
button.mappingOfOnAction().addSourceMapping(IWDButton.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.
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.