Java Reference
In-Depth Information
private String email;
//...getter and setter
}
The following code shows an example of the content of the web page allowing can-
didates to enter their personal identification. As you can see, we used the pass
through attribute explained in Chapter 3 , The Presentation Layer , to use the calen-
dar of HTML5 and we put the tag <h:message/> next to each field with the ID of
the concerned field in order to display error messages in case of violation of the con-
straint. This allows us to have the screen capture shown in the following screenshot.
The following code is an example of the contents of the identificationInform-
ationPage.xml JSF page:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:pta="http://xmlns.jcp.org/jsf/
passthrough"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Inscription information</title>
</h:head>
<h:body>
<f:view>
<h:form>
<table border="0">
<tbody>
<tr>
<th>Name :</th>
<th><h:inputText
value="#{inscriptionBean.name}"id="name"/></th>
<th><h:message for="name"
style="color:red"/></th>
</tr>
<tr>
<td>Birthday :</td>
Search WWH ::




Custom Search