This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
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
Display value of 'checked' radio button
Create a Different selectOneListbox Depending On the Radio Button Clicked
Chaging the layout (pageDirection/lineDirection) of the HtmlSelectOneRadio
Nest the selectOneRadio Under the selectManyCheckbox