cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Buttons Selected

Former Member
0 Kudos

HI,

I have a requirement that I need to display 5 radiobuttons on output, if I select 1st radiobutton then i should display as 1st is selected, like that for all the remaining radiobuttons.please esnd the coding and approach for this task.Good answers are rewarded more points. Its very urgent.

Accepted Solutions (0)

Answers (3)

Answers (3)

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Use radio button Group by key create dictionary simple type and enter five enumeration values for five radio button. Then create the attribute and set the type to this dictionary simple type.

Bind this to radio button Group by key .

Then on click of the button i.e onSelect event of radio button write the code.

String val=wdContext.currentContextElement().getSelectedkey();

Then print it using message manager.

wdComponentAPI.getMessageManager().reportSuccess( val);

Check this

Regards,

Vijayakhanna Raman

Former Member
0 Kudos

Hi

Use the RadioButtonGroupbyIndex.

and set the lead selection

int index=0;

wdContext.node<Radio>().setLeadSelection(index);

See this thread

Kind Regards

Mukesh

Former Member
0 Kudos

Hi

If u havent given any text value to the Keytoselect property of the radiobutton then

Create an action and bind it to the property onSelect of the radiobutton.

In the onAction<action name> give the below code.

String val = wdContext.currentContextElement.get<attribute name binded to selectedkey property of the radio button>();

wdComponentAPI.getMessageManager.reportSuccess("Selected value is "+val);

- Rathna