Java Reference
In-Depth Information
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Create New Premium Customer</title>
</h:head>
<h:body>
<h:form>
<h3>Create New Customer</h3>
<h:panelGrid columns="3">
<h:outputLabel for="firstName" value="First Name"/>
<h:inputText id="firstName"
value="#{premiumCustomer.firstName}"/>
<h:message for="firstName"/>
<h:outputLabel for="middleName" value="Middle Name"/>
<h:inputText id="middleName"
value="#{premiumCustomer.middleName}"/>
<h:message for="middleName"/>
<h:outputLabel for="lastName" value="Last Name"/>
<h:inputText id="lastName"
value="#{premiumCustomer.lastName}"/>
<h:message for="lastName"/>
<h:outputLabel for="email" value="Email Address"/>
<h:inputText id="email"
value="#{premiumCustomer.email}"/>
<h:message for="email"/>
<h:outputLabel for="discountCode" value="Discount
Code"/>
<h:inputText id="discountCode"
value="#{premiumCustomer.discountCode}"/>
<h:message for="discountCode"/>
<h:panelGroup/>
<h:commandButton value="Submit"
action="#{premiumCustomerController.
saveCustomer}"/>
</h:panelGrid>
</h:form>
</h:body>
</html>
In this example, we are using the default name for our bean, which is the class name
with the first letter switched to lowercase.
 
Search WWH ::




Custom Search