Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple alignment problem with select one radio

 
rakesh verma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
rakesh verma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this Thread

Thanks,
 
rakesh verma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic