rowsPerPageTemplate="5,10,15"
rowKey="#{contact.id}"
selectionMode="single"
selection="#{contactListBean.selectedContact}">
<f:facet name="header">
#{msg['label_contact_list']}
</f:facet>
<p:column sortBy="#{contact.firstName}">
<f:facet name="header">
<h:outputText value="#{msg['label_contact_first_name']}" />
</f:facet>
<h:outputText value="#{contact.firstName}" />
</p:column>
<p:column sortBy="#{contact.lastName}">
<f:facet name="header">
<h:outputText value="#{msg['label_contact_last_name']}" />
</f:facet>
<h:outputText value="#{contact.lastName}" />
</p:column>
<p:column sortBy="#{contact.birthDate}">
<f:facet name="header">
<h:outputText value="#{msg['label_contact_birth_date']}" />
</f:facet>
<h:outputText value="#{contact.birthDate}">
<f:converter converterId="jodaDataTimeConverter" />
</h:outputText>
</p:column>
<f:facet name="footer">
<p:commandButton value="View Selected" icon="ui-icon-search"
update="form:display" action="view"/>
</f:facet>
</p:dataTable>
</h:panelGrid>
</h:form>
</ui:define>
</ui:composition>
In Listing 18-10, one new namespace (the p-namespace) was defined, which corresponds to the
PrimeFaces JSF components. The Facelets' <ui:composition> tag is used to define a composition of view
components, using standard.xhtml as the template file.
The <ui:define> tags define the contents for including in the template. You can see that the two
variables (title and content) required by the template (specified by the <ui:insert> tag in
standard.xhtml) are provided.
For the content area, we use PrimeFaces' DataTable component to display the list of contacts in a
table format. EL expressions were used to access the model attributes in the underlying backing beans,
which are maintained by Spring Web Flow based on the flow definition. In the <p:dataTable> tag,
configuration parameters are provided, such as the support of pagination, rows per page, selection
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home