on 09-14-2006 7:46 AM
Hi,
I have a req that I should display 5 RadioButtons on OUTPUT and when I select either of all these they should display 1,2,3,4,5 are selected individually.
I got the output but when I SELECT Iam unable to see the message that " Button 1 is selected". I created action also.Kindly send me the correct solution with necesssary coding. Its Urgent....
Hi
Try this
Create a RadioButtonGroupbyIndex
List radio = new ArrayList();
//Create the element of radio and bind it to the list
//for eg from db
for(int j=1;j<6;j++){
IPrivate<View>.I<Radio>Element ele=wdContext.create<Rdio>Element();
ele.set<Param>(String.valueOf(j));
radio.add(ele);
}
//add the list to radio node
wdContext.node<radio>().bind(radio);
you can receive the value of radio as
String radiovalue=wdContext.current<radio>Element().get<param>();
wdComponentAPI.getMessageManager().reportSuccess(radiovalue);
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't completely understand your question, so I must guess: You have 5 radio buttons in a RadioButtonGroupByIndex, and if a button is selected, you want to get a message "button x has been selected".
Assign an action "ButtonSelected" to the RadioButtonGroupByIndex.onSelect event.
Let X be the context node with the attribute providing the radio button texts.
In the action handler:
void onActionButtonSelected(...)
{
int selectedIndex = wdContext.nodeX().getLeadSelection();
wdComponentAPI.getMessageManager().reportSuccess("Button at index " + selectedIndex + " has been selected.";
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
when u create a radiobutton u have to link an action tab with it, so whenever u will select any radiobutton it should display the requirement for that u have to do linking in properties of indivisual Radio button for that particular action.
All The Best
Priyanka
Do reward points.
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 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.