Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version='1.0' encoding='UTF-8' ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- xmlns:p="http://primefaces.org/ui">
- <body>
- <ui:composition template="./layout/default.xhtml">
- <ui:define name="title">
- New Customer
- </ui:define>
- <ui:define name="content">
- <h:form>
- <p:panelGrid columns="2">
- <f:facet name="header">
- Create New Customer
- </f:facet>
- <h:outputLabel for="name">Name: </h:outputLabel>
- <p:inputText id="name" value="#{customerManagedBean.name}" />
- <h:outputLabel>Gender:</h:outputLabel>
- <p:selectOneMenu value="#{customerManagedBean.gender}">
- <f:selectItem itemValue="1" itemLabel="Female" />
- <f:selectItem itemValue="2" itemLabel="Male" />
- </p:selectOneMenu>
- <h:outputLabel for="dob">Date of Birth (dd/mm/yyyy):
- </h:outputLabel>
- <p:inputText id="dob" value="#{customerManagedBean.dob}">
- <f:convertDateTime pattern="dd/MM/yyy"/>
- </p:inputText>
- </p:panelGrid>
- <br />
- <p:commandButton value="Submit"
- actionListener="#{customerManagedBean.addCustomer}"
- action="searchCustomers.xhtml?faces-redirect=true"/>
- </h:form>
- </ui:define>
- </ui:composition>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement