O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – using the SelectManyCheckbox component

Let us see how we can use the <p:selectManyCheckbox> component, by performing the following steps:

  1. 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" />  
            </p:selectManyCheckbox> <h:outputText value="Popular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required