Java Reference
In-Depth Information
The following screenshot shows a PrimeFaces-specific version of the registration
application we developed in the previous chapter:
As we can see, the application renders beautifully and all we had to do was replace
standard JSF components with their PrimeFaces-specific counterparts. Notice that
an asterisk is automatically added to the label for all the required fields.
The following snippet shows the relevant parts of the markup to generate the
registration page:
<p:panelGrid columns="2"
<p:outputLabel value="Salutation: " for="salutation"/>
<p:selectOneMenu id="salutation" label="Salutation"
<f:selectItem itemLabel="" itemValue=""/>
<f:selectItem itemLabel="Mr." itemValue="MR"/>
<f:selectItem itemLabel="Mrs." itemValue="MRS"/>
<f:selectItem itemLabel="Miss" itemValue="MISS"/>
<f:selectItem itemLabel="Ms" itemValue="MS"/>
<f:selectItem itemLabel="Dr." itemValue="DR"/>
<p:outputLabel value="First Name:" for="firstName"/>
<p:inputText id="firstName" label="First Name"
value="#{registrationBean.firstName}" />
<p:outputLabel value="Last Name:" for="lastName"/>
<p:inputText id="lastName" label="Last Name"
Search WWH ::

Custom Search