jQuery in Action, 2nd edition
The moose likes JSF and the fly likes Want a Default Selected Radio Button.  What to Do? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Want a Default Selected Radio Button.  What to Do?" Watch "Want a Default Selected Radio Button.  What to Do?" New topic
Author

Want a Default Selected Radio Button. What to Do?

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I want to show a default selected radio button when the web page is loaded for the first time. Normally, I create a set of radio buttons this way:

To show a default selection, I can add a statement in my backing bean
where "imports" is the value of one of my buttons. Then, I display the web page this way:

The problem is that whatever the radio button that users actually select, its value is assigned to the defaultSelectedDataTransferType.

I want the dataTransferType gets the value of the button that users select. What should I do?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Want a Default Selected Radio Button. What to Do?
 
Similar Threads
Validation skip
Nest the selectOneRadio Under the selectManyCheckbox
Display value of 'checked' radio button
Chaging the layout (pageDirection/lineDirection) of the HtmlSelectOneRadio
Create a Different selectOneListbox Depending On the Radio Button Clicked