on 12-21-2005 3:17 PM
Hello
I have few buttons in a view, for every button the text property is binded to a different variable in context, and all buttons have to execute the same action.
The question is: how can I get the text from the selected button?
Thank you
Hello Georgeta,
You should use in wdDoModifyView
final String id = element.getId();
final IWDButton button = (IWDButton)element;
button.mappingOfOnAction().addParameter( "actionID", id );
and add to your action handler new parameter
String actionID
.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
I had the same ideea to create an action for every button, but practicaly there are around 40 buttons in that view.
I found Maksim's ideea very elegant, and it is working very well now.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Georgeta,
The easiest way is to create different actions for each button. You can create a private method whic performs the action and can be called in each of these action methods. Under each action methods, you can get the corresponding text from the context for the view.
Regards,
Suresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.