About the Oracle ADF Lifecycle

Applications you create with Oracle ADF use an implementation of an Oracle ADF lifecycle interface. This interface provides the hooks necessary to connect the action of a web page to the Model data bindings. The lifecycle calls the correct binding container needed for a web page and prepares the data to be rendered based on the bindings in the binding container. The binding container pools the data and stores it locally before rendering the page. By avoiding additional round trips to the database before a web page is rendered, the lifecycle improves application performance during the rendering process.

Because the lifecycle interface behavior is independent of the Struts controller, Model 1 applications as well as Model 2 applications use the lifecycle interface. The lifecycle:

  1. Controls whether updates should occur.
  2. Makes sure updates happen.
  3. Causes validation of updates.
  4. Handles Model events: create, update, delete, and any custom events.
  5. Dispatches the action forward to the next page or action.

The Oracle ADF libraries provide several lifecycle classes. The technology scope you choose determines the lifecycle class used by the application:

Note: All lifecycle classes use a lifecycle context to provide the parameters needed by the lifecycle methods.

The following diagram shows the class hierarchy and packages:

Class hierarchy of lifecycle classes, described in text

The ADF framework uses these classes transparently, although you can customize their behavior. You can override lifecycle methods, but you cannot change the order in which the methods are called.

For javadoc on the Lifecycle interface and the classes that implement it:

oracle.adf.controller.lifecycle.Lifecycle
oracle.adf.controller.lifecycle.PageLifecycle
oracle.adf.controller.struts.actions.StrutsPageLifecycle
oracle.adf.controller.struts.actions.StrutsUixLifecycle

You can also view the source code for any class in the technology scope of your application by selecting Navigate | Go to Java Class from the main JDeveloper menu. Enter the class name in the dialog text field and click OK.


About Oracle ADF Data Controls
Customizing the Oracle ADF Lifecycle

 

Copyright © 1997, 2004, Oracle. All rights reserved.