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.
the layout of h:selectOneRadio can either go horizontal or vertical, so is there a
Share
It’s not exactly that, but you could use Tomahawk’s
<t:selectOneRadio>with thelayoutattribute 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.
or even when the amount of radio buttons is unspecified
(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)