How to make Radiobutton Group default selection?

Hi everyone,

I am having a requirement where i need to make one of the choices in radiobutton group as default selection.As i found no property is there.can anyone provide a solution how to make it as a default selection?Kindly rply at the earliest…

The ‘Value’ property of the control specifies which value is initially selected.

Hi Eric,

I’m trying the same. Correct me if I’m wrong.

In the RadioButtonGroup ‘Value’ property we mention to which field of WS client we map to, and in each in each Choice>>Option Value property>> we have two properties

ItemValue => where we give the value which we need to set
Value => Blank

Here with attached the screen shot. Please suggest where I set the default value (i.e I need the Auto Radio to be selected as default).

Regards,
Sam

RadioOptionButton.png

Set the “Value” of Radio Button Group equals the “Item Value” of Option.

Hi Xiawong,

Yes by doing your above step we able to make the Radio button default selection.

But once I do like that, how can I pass the value to WS client variable. Please find the screen shot as how I pass the value to WS client variable…

Regards,
Sam

Sorry, I don’t know what’s the “WS client variable” means, I assume you mean the tagStatus variable in the screenshot. You can simply click the OK button, then set the “Value” of RadioButtonGroup to this variable, and make sure the value of variable equals the “Item Value” of one of the options, then you will get the dynamical default selection based on tagStatus variable.

Hope this helps.

BTW, I’m Xiaowei Wang, not Xiawong :smiley:

Hi,

Sorry its typo error (I mixed both your first and last name).

Here the value of
Active=Y
NotActive=N

If I set “Radio Button Group” ‘Value’ as N default NotActive will be selected. But I can’t pass the value to Manage Bean >> web service connector variable.

Instead if I set “Radio Button Group” ‘Value’ to Message Bean >> Web Service connector variable I can pass the value which I select explicitly while clicking the ‘Submit’ button by invoking ManageBean>>Action, but I can’t have the default Radio button get selected.

Here I have attached the screen shots. First screen by which default value get selected because I set to “N” (NotActive option button ItemValue) but I don’t how to pass the value to webService connector. Whereas in 2nd screen I can pass the value to webServiceConnector but I can’t set the default value.

So can you tell me If I set the Default value, how can I pass the value of this “Radio button” to webservice connector variable (which comes in Right side of the screen)

Sam.


ValueScreen1 is the first screen and
ValueScreen2 is the second screen (it got swapped while loading).

  • Sam.

Your should change the bind direction.

  1. Set the default value N as you have done
  2. Right click the RadioButtonGroup > Source > Create Control Accessor
  3. Choose your variable in Message Bean, in “Data Binding” bind it to Value field of the accessor you created in step2

Hi Xiaowei,

Thanks it’s worked… I didn’t know this option to use.
Thank you so much :slight_smile:

Sam.