Java Reference
In-Depth Information
At this point we are ready to test our custom validator.
When entering an invalid email address into the email address input field and
submitting the form, our custom validator logic was executed and the
String
we
passed as a parameter to
FacesMessage
in our
validator()
method is shown as the
error text by the
<h:message>
tag for the field.
Displaying Tabular Data
JavaServer Faces includes the
<h:dataTable>
tag that makes it easy to iterate
through an array or collection of objects. With NetBeans, a data table tag can be
added to a page by simply dragging the
JSF Data Table
item from the NetBeans
palette into our page. In order to demonstrate the usage of this tag, let's create a new
Web Application
project, and add a new JSP named
registrationlist.jsp
to it.