Time for action – using the SelectManyCheckbox component
Let us see how we can use the <p:selectManyCheckbox>
component, by performing the following steps:
- Create a form using the
<p:selectManyCheckbox>
components:<h:form id="form1" style="width:500px; margin: 0 auto;"> <p:messages autoUpdate="true" escape="false" /> <p:panel header="SelectManyCheckBox"> <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5"> <h:outputText value="Favourite Tags: " /> <p:selectManyCheckbox value="#{selectionController.favoriteTags}"> <f:selectItem itemLabel="JSF" itemValue="jsf" /> <f:selectItem itemLabel="PrimeFaces" itemValue="primefaces" /> <f:selectItem itemLabel="Spring" itemValue="spring"...