File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Spacing radio buttons 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 "Spacing radio buttons" Watch "Spacing radio buttons" New topic
Author

Spacing radio buttons

Peter Fat
Greenhorn

Joined: Oct 18, 2010
Posts: 24
Hi!

I'm using a h:selectOneRadio, with 2 radio buttons that have no labels. But since they have to be in the same cell (because they have dynamic ids), I can't separate them. My code:



How can I solve this?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14487
    
    7

Actually, they're not in "the same cell".

SelectOneRadio renders as an HTML table. Each button is a cell in that table. However, it's an anonymous cell. So the solution is to apply a styleClass to the selectOneRadio and use the magic of CSS to qualify it. If my CSS memory serves, that means something like:



Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Fat
Greenhorn

Joined: Oct 18, 2010
Posts: 24
You're the man!!! Thank you so much!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Spacing radio buttons
 
Similar Threads
How to select one Radio button by default.
simple alignment problem with select one radio
Message after SelectOneRadio moved to next line
Radio
Display value of 'checked' radio button