cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Buttons Selection

Former Member
0 Kudos

Hi,

I have a requirement that I need to display 5 Radiobuttons on output, when I select 1st Radiobutton it should show the message that "Button 1 is selected". like that if I select remaining Buttons they should display individually like 2,3,4,5 are selected.

I Need the coding and the steps from scratch to end.

Good answers are given excellent points.

ITS VERY URGENTTTT.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Try this

Create Radiobutton Group by index And bind the value by dynamically

List radio = new ArrayList(); //define a List object

IPrivate<View>.I<Radio>node ele=wdContext.node<Radio>();

int num=1;

while(num<=5)

{

IPrivate<View>.I<Radio>Element ele=wdContext.create<Radio>Element();

ele.set<Param>(num);

radio.add(ele);

num++;

}

//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("Radio "+ radiovalue + " is Selected");

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Check this.

Regards,

Vijayakhanna Raman

Former Member
0 Kudos

Hi

Try this

In the onSelect of Radiobutton create an action

String radio=wdContext.current<RadioElement>().get<paran>();

wdComponentAPI.getMessageManager().reportSuccess("Radio "radio" is selected");

See the thread

Kind Regards

Mukesh