Advertisement
hsianghui

IS3106 Lab4 Exercise 2.2 (searchCustomers.xhtml)

Sep 14th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.45 KB | None | 0 0
  1. <?xml version='1.0' encoding='UTF-8' ?>
  2. <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
  4.                template="./layout/default.xhtml"
  5.                xmlns:p="http://primefaces.org/ui"
  6.                xmlns:h="http://xmlns.jcp.org/jsf/html">
  7.  
  8.     <ui:define name="title">
  9.         Search Customers
  10.     </ui:define>
  11.  
  12.     <ui:define name="content">
  13.         <p:dataTable var="customer"
  14.                     value="#{customerManagedBean.customers}"
  15.                     resizableColumns="true">
  16.             <p:column headerText="Id">
  17.                 <h:outputText value="#{customer.id}"/>
  18.             </p:column>
  19.  
  20.             <p:column headerText="Name">
  21.                 <h:outputText value="#{customer.name}"/>
  22.             </p:column>
  23.            
  24.             <p:column headerText="Gender">
  25.                 <h:outputText value="Female" rendered="#{customer.gender == 1}"/>
  26.                 <h:outputText value="Male" rendered="#{customer.gender == 2}"/>
  27.             </p:column>
  28.            
  29.             <p:column headerText="DOB">
  30.                 <h:outputText value="#{customer.dob}"/>
  31.             </p:column>
  32.            
  33.             <p:column headerText="DOB">
  34.                 <h:outputText value="#{customer.created}"/>
  35.             </p:column>
  36.         </p:dataTable>
  37.     </ui:define>
  38.  
  39. </ui:composition>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement