Time for action – using the SelectManyButton component
Let us see how to use the <p:selectManyButton>
component, by performing the following step:
- Create a form with the
<p:selectManyButton>
component with multiple options:<h:form> <p:panel header="SelectManyButton"> <h:panelGrid style="margin-bottom:5px" cellpadding="3"> <p:selectManyButton value="#{selectionController.numbers}"> <f:selectItem itemLabel="One" itemValue="1"/> <f:selectItem itemLabel="Two" itemValue="2"/> <f:selectItem itemLabel="Three" itemValue="3"/> </p:selectManyButton> </h:panelGrid> <p:commandButton value="Submit" update="display"/> <h:outputText id="display"value=" Value : #{selectionController.numbers}" /> </p...