HTML and CSS Reference
In-Depth Information
Chapter 3
JSF Under the Hood—Part 2
JSF conversion and validation is one of the most important topics in the JSF framework which is covered in detail
in this chapter. This chapter explains how conversion and validation works in the JSF request processing life cycle.
You will learn how to use and customize the standard JSF converters and validators in your JSF application(s) and
how to create your own custom converters and validators when the standard converters and validators do not fully
fit the application's needs. Finally, you will understand how to utilize Java Bean Validation (JSR 303) APIs in order to
empower and standardize your JSF application validation.
Conversion and Validation in the JSF LifeCycle
As we know from Chapter 1, conversion is about converting the HTTP request parameters to the corresponding
Java types in order to eliminate the overhead required from the developer to implement this functionality for every
web application, while validation is about validating the user input for certain condition(s). The conversion and the
validation process in the JSF life cycle can occur in three phases, as shown in Figure 3-1 .
Restore View
Request
Apply Request
Values
Process
Validations
Update Model
Values
Invoke
Application
Render
Response
Response
Figure 3-1. The possible JSF phases in which conversion and validation can happen
 
Search WWH ::




Custom Search