First page Back Continue Last page Graphics


Coordinating JSF and ADF Life Cycles (continued)

Apply Request Values: Values provided in components that hold a value (such as input fields) have their values applied to their counterparts in the view tree. All events such as ValueChangeEvents (VCE) or ActionEvents (AE) are queued. If a component has its immediate attribute set to true, then validation, conversion, and events associated with the component are processed during this phase.

Process Validation: Conversion and validation logic is executed for each component. This means both built-in validation/data conversion and custom validation/conversion are added onto the components. If a validation error is reported, an exception is thrown. The life cycle halts and the response is rendered with validation error messages. At the end of this phase, new component values are set, any validation or conversion error messages and events are queued on FacesContext, and any value change events are delivered.

Update Model: The component’s validated local values are moved to the model and the local copies are discarded. If you are using a backing bean for a JSF page to manage your UI components, any managed bean properties that are value-bound to a UI component using the value attribute are updated with the value of the component.

Validate Model Updates: The updated model is now validated against any validation routines set on the model. Exceptions are caught by the binding container and cached.

Invoke Application: Any action bindings for command components or events are invoked. Navigation is handled here depending on the outcome of the action method (if any).

Metadata Commit: Run-time metadata changes to the model are committed, which stores any run-time changes made to the application using the Metadata Service (MDS).

Prepare Render: The binding container is refreshed to allow for any changes that may have occurred in the Apply Request Values or Validation phases. Any iterators that correspond to read-only components (such as an outputText component) are refreshed. The prepareRender event and the afterJSFRenderResponse event are sent to all registered listeners. Note: Instead of displaying prepareRender as a valid phase for a selection, JDeveloper displays renderModel, which represents the refresh(RENDER_MODEL) method called on the binding container.

Render Response: The components in the tree are rendered as the Java EE Web container traverses the tags in the page. State information is saved for subsequent requests and the Restore View phase.