JSF Request Life Cycle: Apply Request Values
The purpose of the Apply Request Values phase is for each component to retrieve its current state. The components must first be retrieved or created from the FacesContext object, followed by their values. Component values are typically retrieved from the request parameters, although they can also be retrieved from cookies or headers.
If a component’s immediate event handling property is set to true, the component’s value is validated during this phase. If the validation fails, an error message is generated and queued in FacesContext, where it will be displayed during the Render Response phase along with any other validation errors.
Setting the component’s immediate property to true does not cause any of the life cycle phases to be skipped unless validation fails, in which case, the processing jumps to the Render Response phase to display the current view with the validation errors. If you want to jump to the Render Response phase in other cases, you can use a value change listener. This is described in a later slide in this lesson.