aspose file tools*
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
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?