Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8178197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:42:17+00:00 2026-06-06T23:42:17+00:00

the layout of h:selectOneRadio can either go horizontal or vertical, so is there a

  • 0

the layout of h:selectOneRadio can either go horizontal or vertical, so is there a way that I can do some custom layout. For example, instead of displaying 8 radio button, display them in 2 rows with 4 on each row? Please provide your answer beside PrimeFaces p:selectOneRadio solution, it use CSS3 causing IE8 to display the radio button in rectangle shape.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:42:18+00:00Added an answer on June 6, 2026 at 11:42 pm

    It’s not exactly that, but you could use Tomahawk’s <t:selectOneRadio> with the layout attribute set to "spread" to have a markupless rendering of radio buttons. You can then use <t:radio> to place the individual radio buttons in the markup the way you want, such as in a <h:panelGrid columns="4">.

    E.g.

    <t:selectOneRadio id="foo" value="#{bean.selectedItem}" layout="spread">
        <f:selectItems value="#{bean.availableItems}" />
    </t:selectOneRadio>
    
    <h:panelGrid columns="4">
        <t:radio for="foo" index="0" />
        <t:radio for="foo" index="1" />
        <t:radio for="foo" index="2" />
        <t:radio for="foo" index="3" />
    
        <t:radio for="foo" index="4" />
        <t:radio for="foo" index="5" />
        <t:radio for="foo" index="6" />
        <t:radio for="foo" index="7" />
    </h:panelGrid>
    

    or even when the amount of radio buttons is unspecified

    <h:panelGrid columns="4">
        <c:forEach items="#{bean.availableItems}" varStatus="loop">
            <t:radio for="foo" index="#{loop.index}" />
        </c:forEach>
    </h:panelGrid>
    

    (note that <ui:repeat> is not suitable as it runs during view render time and thus end up as a single column of <h:panelGrid>, you’d need to use plain HTML <table> instead)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My layout file defines a WebView, underneath which there are some fixed height buttons.
Layout and rendering of HTML content can take some time if the HTML is
The JSF component SelectOneRadio layout is very limited so I wrote a custom Renderer
This is my code: <t:selectOneRadio id=someId layout=spread forceId=true forceIdIndex=false value=#{someHandler.value} required=true> <f:selectItems value=#{someOtherHandler.values} var=item
I am having some trouble with using h:selectOneRadio . I have a list of
<s:decorate template=/layout/display-text.xhtml> <h:selectOneRadio layout=pageDirection value=#{_userHome.pref}> <f:selectItems value=#{_userHome.getPreferences()} /> </h:selectOneRadio> </s:decorate> I am able to
i have the following in my page. <h:selectOneRadio layout=pageDirection > <s:selectItems value=#{usageList} var=entry label=#{labels[entry.label]}
Graphical Layout tab does not appear for some layout files into Eclipse I tried
Here is my html code. <table > <tr> <th rowspan=3> <h:selectOneRadio layout=pageDirection onClick=alert('selam') id=selectOneRadio>
My layout.xml consists of a FrameLayout with a few TextViews and Buttons, that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.