Java Reference
In-Depth Information
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.
Facelets templating
One advantage that Facelets has over JSP is its templating mechanism. Templates
allow us to specify page layout in one place, then we can have template clients
that use the layout defined in the template. Since most web applications have
consistent layout across pages, using templates makes our applications much more
maintainable, since changes to the layout need to be made in a single place. If at one
point we need to change the layout for our pages (add a footer, or move a column
from the left side of the page to the right side of the page, for example), we only need
to change the template, and the change is reflected in all template clients.
NetBeans provides very good support for facelets templating. It provides several
templates "out of the box", using common web page layouts.
Search WWH ::

Custom Search