Oracle ADF Controller API Reference 10.1.2 B14363-02


oracle.adf.controller.lifecycle
Interface Lifecycle

All Known Implementing Classes:
DataAction, PageLifecycle

public interface Lifecycle

The ADF Lifecycle provides support allowing a web page to interact with ADF Model data bindings. The lifecycle calls the correct binding container needed for a JSP or UIX page, updates values in the binding container's bindings if necessary, and prepares the data to be rendered. The binding container stores this data locally before rendering the page.

NOTE: Implementations of Lifecycle should be thread-safe and use the LifecycleContext object as the place to store any per-request state they may need.

Since:
9.0.5

Method Summary
 void buildEventList(LifecycleContext lcContext)
          Builds the list of events with their possible associated action binding from the request parameters.
 void findForward(LifecycleContext lcContext)
          Forwards the request or redirects the response to the next web page in the flow.
 java.lang.reflect.Method getEventMethod(LifecycleContext lcContext, java.lang.String name)
          Retrieve the Method class for an event name.
 void handleError(LifecycleContext lcContext, java.lang.Exception ex)
          Handles any exceptions that occurred during the Lifecycle processing.
 void handleLifecycle(LifecycleContext lcContext)
          Define all the phases of the lifecycle and the order they are executed.
 boolean hasErrors(LifecycleContext lcContext)
          Ask the context if any errors have been recorded during this lifecycle.
 void initializeMethodParameters(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
          This method is invoked before any ControlBinding or custom method is being executed.
 void invokeCustomMethod(LifecycleContext lcContext)
          Invokes the custom method associated with the binding container.
 void prepareModel(LifecycleContext lcContext)
          Give the opportunity for the data model to prepare and initialize.
 void processComponentEvents(LifecycleContext lcContext)
          Handle any events in the action binding list previously built in processUpdateModel using the buildEventList method.
 void processUpdateModel(LifecycleContext lcContext)
          Update the data model with values submitted in the request.
 void refreshModel(LifecycleContext lcContext)
          Used to notify the model when updates are over with.
 void reportErrors(LifecycleContext lcContext)
          Report the error list to the view layer.
 boolean shouldAllowModelUpdate(LifecycleContext lcContext)
          Allows clients to determine whether the model should be updated.
 void validateModelUpdates(LifecycleContext lcContext)
          Forces model-level validation to occur.

 

Method Detail

handleLifecycle

public void handleLifecycle(LifecycleContext lcContext)
                     throws java.lang.Exception
Define all the phases of the lifecycle and the order they are executed.
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception

buildEventList

public void buildEventList(LifecycleContext lcContext)
Builds the list of events with their possible associated action binding from the request parameters.
Parameters:
lcContext - the lifecycle context

prepareModel

public void prepareModel(LifecycleContext lcContext)
                  throws java.lang.Exception
Give the opportunity for the data model to prepare and initialize. This method will throw if the data model cannot be prepared.
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception

shouldAllowModelUpdate

public boolean shouldAllowModelUpdate(LifecycleContext lcContext)
Allows clients to determine whether the model should be updated.
Parameters:
lcContext - the lifecycle context.
Returns:
true, if the model should be updated during this lifecycle

processUpdateModel

public void processUpdateModel(LifecycleContext lcContext)
Update the data model with values submitted in the request.
Parameters:
lcContext - the lifecycle context

validateModelUpdates

public void validateModelUpdates(LifecycleContext lcContext)
Forces model-level validation to occur.
Parameters:
lcContext - the lifecycle context

hasErrors

public boolean hasErrors(LifecycleContext lcContext)
Ask the context if any errors have been recorded during this lifecycle.
Parameters:
lcContext - the lifecycle context
Returns:
true, if any validation errors have been stored in the LifecycleContext.

processComponentEvents

public void processComponentEvents(LifecycleContext lcContext)
                            throws java.lang.Exception
Handle any events in the action binding list previously built in processUpdateModel using the buildEventList method.
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception

initializeMethodParameters

public void initializeMethodParameters(LifecycleContext lcContext,
                                       oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
This method is invoked before any ControlBinding or custom method is being executed. Overriding this method gives an opportunity to set the parameters.
Parameters:
lcContext - the lifecycle context
actionBinding - the action binding object to initialize

invokeCustomMethod

public void invokeCustomMethod(LifecycleContext lcContext)
Invokes the custom method associated with the binding container.
Parameters:
lcContext - the lifecycle context

refreshModel

public void refreshModel(LifecycleContext lcContext)
Used to notify the model when updates are over with.
Parameters:
lcContext - the lifecycle context

handleError

public void handleError(LifecycleContext lcContext,
                        java.lang.Exception ex)
Handles any exceptions that occurred during the Lifecycle processing.
Parameters:
lcContext - the lifecycle context
ex - the exception to record

reportErrors

public void reportErrors(LifecycleContext lcContext)
Report the error list to the view layer.
Parameters:
lcContext - the lifecycle context

findForward

public void findForward(LifecycleContext lcContext)
                 throws java.lang.Exception
Forwards the request or redirects the response to the next web page in the flow.
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception

getEventMethod

public java.lang.reflect.Method getEventMethod(LifecycleContext lcContext,
                                               java.lang.String name)
Retrieve the Method class for an event name.
Parameters:
lcContext - the lifecycle context
name - name of the event
Returns:
the Method object for this event if exist

Oracle ADF Controller API Reference 10.1.2 B14363-02


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