This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to have default value for radio button?
 
Similar Threads
Create a Different selectOneListbox Depending On the Radio Button Clicked
default values to set for radio / pulldown lists
Using boolean value in SelectOneRadio
Default selected radio button for <h:selectOneRadio> in JSF
selectOneRadio, backing beans and mapping (ICEfaces)