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">
- <h:outputLabel for="name">Name: </h:outputLabel>
- <h:panelGroup>
- <h:inputText id="name" value="#{customerManagedBean.name}" required="true" requiredMessage="Name is required"/>
- <p:message for="name" />
- </h:panelGroup>
- <h:outputLabel>Gender:</h:outputLabel>
- <h:selectOneMenu value="#{customerManagedBean.gender}">
- <f:selectItem itemValue="1" itemLabel="Female" />
- <f:selectItem itemValue="2" itemLabel="Male" />
- </h:selectOneMenu>
- <h:outputLabel for="dob">Date of Birth (dd/mm/yyyy):</h:outputLabel>
- <h:panelGroup>
- <h:inputText id="dob" value="#{customerManagedBean.dob}"
- required="true"
- requiredMessage="DOB is required"
- converterMessage="Format should be dd/mm/yyyy">
- <f:convertDateTime pattern="dd/MM/yyyy" />
- </h:inputText>
- <p:message for="dob" />
- </h:panelGroup>
- </p:panelGrid>
- <br />
- <h:commandButton value="Submit"
- actionListener="#{customerManagedBean.addCustomer}"
- action="searchCustomers?faces-redirect=true"/>
- </h:form>
- </ui:define>
- </ui:composition>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement