wood burning stoves 2.0*
The moose likes JSF and the fly likes How to have default value for radio button? 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 "How to have default value for radio button?" Watch "How to have default value for radio button?" New topic
Author

How to have default value for radio button?

Vladislav Simovic
Ranch Hand

Joined: Feb 03, 2011
Posts: 37
I have written something like this:



bean



Now when i run this code no value is selected. What to do to have default value selected?
Vladislav Simovic
Ranch Hand

Joined: Feb 03, 2011
Posts: 37
Found solution - in <h:selectOneRadio> in value attribute should be placed desired default value.

But alas I have one more problem, when i write code to show radio buttons, between them i have black lines. How can i remove them? I have attched small picture to illistrate what i am talking about.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to have default value for radio button?
 
Similar Threads
selectOneRadio, backing beans and mapping (ICEfaces)
Default selected radio button for <h:selectOneRadio> in JSF
Using boolean value in SelectOneRadio
Create a Different selectOneListbox Depending On the Radio Button Clicked
default values to set for radio / pulldown lists