See the TLD docs @ http://myfaces.apache.org/tlddoc/tomahawk/t/radio.html

A working example can be found at Thomas Spiegl's page... http://www.irian.at/myfaces/selectbox.jsf

Here is my example of how to set out radio buttons in different table cells.

The thing to remember here is that the cells are not shown twice, and are only rendered via the t:radio tag. The contents of t:selectOneRadio is not rendered in the first cell.

(Jeff Porter 5/12/05 MyFaces 1.1.1)

<table border="1">
        <tr>
        <td>
                Nothing Shown in This Cell.                     
                </f:verbatim>
                <t:selectOneRadio id="carChoice" value="#{theTestBean.carChoice}" layout="spread" >
                        <f:selectItem itemValue="0" itemLabel="Ford" />
                        <f:selectItem itemValue="1" itemLabel="Jag" />
                        <f:selectItem itemValue="2" itemLabel="Alfa" />
                </t:selectOneRadio>
                <f:verbatim>:End of Cell.
        </td>
        </tr>

        <tr>
        <td>
                </f:verbatim>
                        <h:panelGroup>
                        <t:radio for="carChoice" index="0" /><f:verbatim>&nbsp;</f:verbatim>
                        <h:inputText value="#{theTestBean.colour}" />
                        </h:panelGroup>
                <f:verbatim>
        </td>
        </tr>


        <tr>
        <td>
                </f:verbatim>
                        <h:panelGroup>
                        <t:radio for="carChoice" index="1" /><f:verbatim>&nbsp;</f:verbatim>
                        <h:inputText value="#{theTestBean.colour}" />
                        </h:panelGroup>
                <f:verbatim>
        </td>
        </tr>

        <tr>
        <td>
                </f:verbatim>
                        <h:panelGroup>
                        <t:radio for="carChoice" index="2" /><f:verbatim>&nbsp;</f:verbatim>
                        <h:inputText value="#{theTestBean.colour}" />
                        </h:panelGroup>
                <f:verbatim>
        </td>
        </tr>

</table>

Radio (last edited 2009-09-20 23:00:50 by localhost)