Skip to Main Content
Mastering JavaServer Faces 2.2
book

Mastering JavaServer Faces 2.2

by Anghel Leonard
June 2014
Intermediate to advanced content levelIntermediate to advanced
578 pages
12h 2m
English
Packt Publishing
Content preview from Mastering JavaServer Faces 2.2

Configuring validators and converters

Data validation is an important part of a JSF application (which has existed since JSF 1.2), because it allows us to separate the business logic from the tedious checks that help us to obtain only valid information from the user. Data is validated in the Process Validations phase (if the immediate attribute is set to true, this processing will occur at the end of the Apply Request Values phase instead) and should be valid and ready to be used before the Update Model Values phase.

Besides the built-in validators, we can write our own customized validators. A public class that implements the Validator interface and overrides the validate method is recognized by JSF as a validator. There are two ways to configure ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaServer Faces

JavaServer Faces

Hans Bergsten

Publisher Resources

ISBN: 9781782176466Supplemental Content