First page Back Continue Last page Graphics

Coordinating JSF and ADF Life Cycles


Coordinating JSF and ADF Life Cycles (continued)

You learned about the JSF life-cycle phases in the lesson titled “Understanding UI Technologies.” The ADF life cycle also contains phases that are defined simply to notify ADF life-cycle listeners before and after the corresponding JSF phase is executed (that is, there is no implementation for these phases), shown in the slide as ADF phases beginning with “JSF.” This enables you to create custom listeners and register them with any phase of both the JSF and ADF life cycles, so that you can customize the ADF page life cycle if needed.

Combining what you learned previously about the JSF life cycle with the ADF life cycle, a page goes through the following phases (ADF life-cycle phases are in italics):

Restore View: The URL for the requested page is passed to the bindingContext, which finds the page definition file that matches the URL. The component tree of the requested page is either newly built or restored. All the component tags, event handlers, converters, and validators on the submitted page have access to the FacesContext instance. If it’s a new empty tree (that is, there is no data from the submitted page), the page life cycle proceeds directly to the Render Response phase.

Initialize Context: Uses the page definition file to create the binding context; initializes the LifecycleContext class with values for request, binding container, and life cycle.

Prepare Model: Prepares and evaluates any page or task flow parameters, refreshes applicable executables