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 advanced PickList component

Let's look at creating a PickList component backed by a collection of POJOs using converter, by performing the following steps:

  1. Create a user-role management form with the PickList component:
    <p:growl id="msg" escape="false" /> <p:pickList id="pojoPickList" value="#{pickListController.roles}" converter="#{roleConverter}" var="role" itemValue="#{role}" itemLabel="#{role.roleName}" showSourceControls="true" showTargetControls="true" showSourceFilter="true" showTargetFilter="true" showCheckbox="true" filterMatchMode="contains" effect="bounce"> <f:facet name="sourceCaption">Available Roles</f:facet> <f:facet name="targetCaption">Assigned Roles</f:facet> <p:ajax event="transfer" listener="#{pickListController.onTransfer}" ...

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