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 Fragment component

Let us look at how we can use two fragments for the User Details and Contact Details sections and partially process each of them individually. Perform the following steps for using two fragment components:

  1. Create a form with two fragments for User Details and Contact Details sections as follows:
    <h:form> <p:panel header="User Account> <p:fragment autoUpdate="true"> <p:fieldset legend="User Details"> <h:panelGrid columns="3"> <h:outputLabel for="emailId" value="EmailId:" /> <p:inputText id="emailId" value="#{userController.emailId}" required="true" label="emailId"/> <p:message for="emailId" display="icon"/> <h:outputLabel for="firstName" value="FirstName:" /> <p:inputText id="firstName" value="#{userController.firstName}" ...

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