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 SelectManyMenu

Let us see how to use <p:selectManyMenu> with POJOs and the showCheckbox attribute, by performing the following step:

  1. Create a form with <p:selectManyMenu> components:
    <h:form> <p:panel header="SelectManyMenu"> <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5"> <h:outputText value="Basic SelectManyMenu: " /> <p:selectManyMenu value="#{selectionController.numbers}"> <f:selectItem itemLabel="One" itemValue="1" /> <f:selectItem itemLabel="Two" itemValue="2" /> <f:selectItem itemLabel="Three" itemValue="3" /> </p:selectManyMenu> <h:outputText value="SelectManyMenu using POJO: " /> <p:selectManyMenu value="#{selectionController.selectedTagsFromPojos}" var="t" showCheckbox="true" converter="#{tagConverter}"> ...

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