Time for action – using the SelectOneRadio component
Let us see how to use the <p:selectOneRadio>
component, by performing the following steps:
- Create a form with
<p:selectOneRadio>
components:<h:form id="form" style="width: 500px; margin: 0 auto;"> <p:panel header="SelectOneRadio"> <h:panelGrid columns="2" style="margin-bottom:5px" cellpadding="2"> <h:outputText value="Gender: " /> <p:selectOneRadio id="gender" value="#{selectionController.gender}"> <f:selectItem itemLabel="Male" itemValue="M" /> <f:selectItem itemLabel="Female" itemValue="F" /> </p:selectOneRadio> <h:outputText value="Favourite Server: " /> <p:selectOneRadio id="server" value="#{selectionController.selectedServer...