jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes simple alignment problem with select one radio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "simple alignment problem with select one radio" Watch "simple alignment problem with select one radio" New topic
Author

simple alignment problem with select one radio

rakesh verma
Greenhorn

Joined: Jul 13, 2005
Posts: 22
I am very new to JSF. I am getting some simple alignment problems of radio buttons...
Here is the code
<h:selectOneRadio id="action" value="#{bean.action}">
<f:selectItem itemValue="A" itemLabel= "AA"/>
<f:selectItem itemValue="B" itemLabel="BB"/>
<f:selectItem itemValue="C" itemLabel="CC" />
<f:selectItem itemValue="D" itemLabel="DD" />
</h:selectOneRadio>

When I run this code, I got all the radio buttons side by side. I like to get each radio button in one row(like in <tr><td>...</td></tr>). I tried writing <tr><td> in between radio buttons but when I view source while running app, all those <tr><td>'s in between selectOneRadio shows up before and then radio's are displayed. Please help me out.

Thanks In Advance..
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

It's up to the JSF implementation to support this. MyFaces allows you to specify your layout. I don't what implementation you are using, but you should look into that.


GenRocket - Experts at Building Test Data
rakesh verma
Greenhorn

Joined: Jul 13, 2005
Posts: 22
Thanks for responding. We are using JavaServer Faces RI. I used that pageDirection option and it is working. I do have one more question.

I have different textboxes for each of those options and I need to display only one of them according to the one selected. And each of those textboxes should be placed just after each option. Making it display visible or not, I can use div tag, but how can I place those textboxed right after each option.

Thanks.
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Have a look at this Thread

Thanks,
rakesh verma
Greenhorn

Joined: Jul 13, 2005
Posts: 22
thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple alignment problem with select one radio
 
Similar Threads
onclick event of command button change the state of radio button but onchange doe not
How to select one Radio button by default.
selectOneRadio problem
Radio
How to make one of the Radio button default selected