on 06-03-2009 12:29 PM
Hi
I Have abutton group with contains 3 buttons with text 1,2,3.when ever i clilck that buttons its text need to be displayed.
Can any one tell me how to achieve this.
Thanks
Rahul
1. Bind TextView to a valueAttribute of type string.
2. initialise the value attribute with empty string
3. create three actions for the buttons
in each action you can either set the valueAttribute text to the button text or hard code it like this:
wdContext.currentContextElement().setValueAtt("button_text");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can achieve this by event parameter mapping. Say the buttons "onAction" events are all mapped to the same action "ButtonPressed" (works also for different actions). Add a parameter "buttonText" to the "ButtonPressed" action and map each button's text to this parameter with code like
wdDoModifyView()
{
if (firstTime)
{
IWDButton button = (IWDButton) view.getElement("button_id");
button.mappingOfOnAction().addParameter("buttonText", button.getText());
}
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
create three context attributes and bind them the TEXTVIEW element you create ,
and on each button click set the test to the context in the button onAction() method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create an element in context of string type & bind the text attribute of button(s) with it, pass text to
element by coding . create a textview & filled it at button click event by coding.
Edited by: Amit Solanki on Jun 3, 2009 6:25 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.