Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle
11g Release 2 (11.1.2.2.0)

E17481-03


oracle.adf.controller.struts.actions
Class DataAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by oracle.adf.controller.struts.actions.DataAction

All Implemented Interfaces:
Lifecycle
Direct Known Subclasses:
DataForwardAction

Deprecated. Use equivalent classes in oracle.adf.controller.v2

public class DataAction
extends org.apache.struts.action.Action
implements Lifecycle

DataAction simplifies implementing Struts-based web applications that use the ADF binding layer by implementing the ADF page handling Lifecycle interface in an easy-to-customize Struts action. By default, it implements Lifecycle by delegating to a default lifecycle implementation object so that for each request it can handle:

There are two ways to extend the Lifecycle functionality for your application-specific needs:

  1. By extending the DataAction class (and using the fully-qualified name of that subclass as the value of the type attribute in your respective Struts action mapping definition).
  2. By extending the Struts lifecycle base class and the lifecycle factory. This allows you to globally customize the behavior of every DataAction without having to have each one extend a common base class. See StrutsPageLifecycleFactory

By default, all of the DataAction's lifecycle method implementations delegate to the default Lifecycle object created by the StrutsPageLifecycleFactory for each web page request. The Lifecycle instance aggregated by the DataAction is defined when the DataAction is configured (see DataActionMapping.freeze() and getPageLifecycle).

You can override any of the lifecycle methods in a DataAction subclass to modify the default lifecycle handling behavior. The entry point for the coordination of the sequence and handling of the lifecycle methods is the handleLifecycle method. Specifically, see PageLifecycle.handleLifecycle for the default implementation of how the lifecycle methods are called and in what order.

You can also extend the DataAction by implementing an event handler. An event handler is a method in your DataAction subclass with a specific signature that will be executed if an event of the same name is found in the request parameters (see handleEvent). This is similar to the behavior of the Struts org.apache.struts.actions.DispatchAction.

Since:
9.0.5

Field Summary
protected  java.lang.Class clazz
          Deprecated. The Class instance for this class (DataAction).
protected  java.lang.Class[] eventParam
          Deprecated. The set of argument type classes for the reflected event method call.
protected  java.util.Map events
          Deprecated. Cache the set of event methods as they are introspected.

 

Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet

 

Constructor Summary
DataAction()
          Deprecated.  

 

Method Summary
protected  void buildEventList(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation buildEventList
 void buildEventList(LifecycleContext lcContext)
          Deprecated. Internal.
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. This is the entry point for the execution of an action from the Struts framework.
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Deprecated. This is another entry point for the execution of an action from the Struts framework using ServletRequest and ServletResponse.
protected  void findForward(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation findForward
 void findForward(LifecycleContext lcContext)
          Deprecated. Internal.
protected  java.lang.reflect.Method getEventMethod(DataActionContext actionContext, java.lang.String eventName)
          Deprecated. Delegate to the Struts page lifecycle implementation getEventMethod
 java.lang.reflect.Method getEventMethod(LifecycleContext lcContext, java.lang.String eventName)
          Deprecated. Internal.
protected  Lifecycle getPageLifecycle(DataActionContext actionContext)
          Deprecated. Retrieves the page lifecycle instance for this data action.
protected  void handleError(DataActionContext actionContext, java.lang.Exception ex)
          Deprecated. Delegate to the Struts page lifecycle implementation handleError
 void handleError(LifecycleContext lcContext, java.lang.Exception ex)
          Deprecated. Internal.
protected  void handleLifecycle(DataActionContext actionContext)
          Deprecated. Coordinates the sequence and handling of the phases of the ADF page lifecycle.
 void handleLifecycle(LifecycleContext lcContext)
          Deprecated. Internal.
protected  boolean hasErrors(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation hasErrors
 boolean hasErrors(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void initializeMethodParameters(DataActionContext actionContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
          Deprecated. Delegate to the Struts page lifecycle implementation initializeMethodParameters
 void initializeMethodParameters(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
          Deprecated. Internal.
protected  void invokeCustomMethod(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation invokeCustomMethod
 void invokeCustomMethod(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void prepareModel(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation prepareModel
 void prepareModel(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void processComponentEvents(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation processComponentEvents
 void processComponentEvents(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void processUpdateModel(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation processUpdateModel
 void processUpdateModel(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void refreshModel(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation refreshModel
 void refreshModel(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void reportErrors(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation reportErrors
 void reportErrors(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void saveErrors(DataActionContext actionContext)
          Deprecated. Save all the error message from the lifecycle context to the request attribute.
 void saveErrors(LifecycleContext lcContext)
          Deprecated. Internal.
protected  boolean shouldAllowModelUpdate(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation shouldAllowModelUpdate
 boolean shouldAllowModelUpdate(LifecycleContext lcContext)
          Deprecated. Internal.
protected  void validateModelUpdates(DataActionContext actionContext)
          Deprecated. Delegate to the Struts page lifecycle implementation validateModelUpdates
 void validateModelUpdates(LifecycleContext lcContext)
          Deprecated. Internal.

 

Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

events

protected java.util.Map events
Deprecated. 
Cache the set of event methods as they are introspected.

clazz

protected java.lang.Class clazz
Deprecated. 
The Class instance for this class (DataAction).

eventParam

protected java.lang.Class[] eventParam
Deprecated. 
The set of argument type classes for the reflected event method call.

Constructor Detail

DataAction

public DataAction()
Deprecated. 

Method Detail

execute

public final org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                            org.apache.struts.action.ActionForm form,
                                                            javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
                                                     throws java.lang.Exception
Deprecated. 
This is the entry point for the execution of an action from the Struts framework.

This method initializes the context class and bootstraps the lifecycle by calling handleLifecycle method.

Since the customization of the DataAction behavior should be achieved by extending the lifecycle functionality, this method is declared final.

Overrides:
execute in class org.apache.struts.action.Action
Parameters:
mapping - the ActionMapping used to select this instance.
form - the optional ActionForm bean for this request.
request - the HTTP Request we are processing.
response - the HTTP Response we are processing.
Throws:
java.lang.Exception

execute

public final org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                            org.apache.struts.action.ActionForm form,
                                                            javax.servlet.ServletRequest request,
                                                            javax.servlet.ServletResponse response)
                                                     throws java.lang.Exception
Deprecated. 
This is another entry point for the execution of an action from the Struts framework using ServletRequest and ServletResponse.

This method simply delegate to the other execute method.

Since the customization of the DataAction behavior should be achieved by extending the lifecycle functionality, this method is declared final.

Overrides:
execute in class org.apache.struts.action.Action
Parameters:
mapping - the ActionMapping used to select this instance.
form - the optional ActionForm bean for this request.
request - the Servlet Request we are processing.
response - the Servlet Response we are processing.
Throws:
java.lang.Exception
See Also:
execute

getPageLifecycle

protected final Lifecycle getPageLifecycle(DataActionContext actionContext)
Deprecated. 
Retrieves the page lifecycle instance for this data action. The page lifecycle instance is determined when the DataActionMapping is configured. The implementation of the lifecycle differ based on the type of web page that this action will service.
Parameters:
actionContext - the lifecycle context for the DataAction
See Also:
StrutsPageLifecycle, StrutsUixLifecycle

handleLifecycle

protected void handleLifecycle(DataActionContext actionContext)
                        throws java.lang.Exception
Deprecated. 
Coordinates the sequence and handling of the phases of the ADF page lifecycle. Delegates to the default implementation in the current Lifecycle object for the current request. This will typically be handleLifecycle for JSP pages and handleLifecycle for UIX pages.
Parameters:
actionContext - the lifecycle context for the DataAction
Throws:
java.lang.Exception

processComponentEvents

protected void processComponentEvents(DataActionContext actionContext)
                               throws java.lang.Exception
Deprecated. 
Delegate to the Struts page lifecycle implementation processComponentEvents
Parameters:
actionContext - the lifecycle context for the DataAction
Throws:
java.lang.Exception

hasErrors

protected boolean hasErrors(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation hasErrors
Parameters:
actionContext - the lifecycle context for the DataAction

handleError

protected void handleError(DataActionContext actionContext,
                           java.lang.Exception ex)
Deprecated. 
Delegate to the Struts page lifecycle implementation handleError
Parameters:
actionContext - the lifecycle context for the DataAction
ex - the exception being thrown

reportErrors

protected void reportErrors(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation reportErrors
Parameters:
actionContext - the lifecycle context for the DataAction

buildEventList

protected void buildEventList(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation buildEventList
Parameters:
actionContext - the lifecycle context for the DataAction

prepareModel

protected void prepareModel(DataActionContext actionContext)
                     throws java.lang.Exception
Deprecated. 
Delegate to the Struts page lifecycle implementation prepareModel
Parameters:
actionContext - the lifecycle context for the DataAction
Throws:
java.lang.Exception

shouldAllowModelUpdate

protected boolean shouldAllowModelUpdate(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation shouldAllowModelUpdate
Parameters:
actionContext - the lifecycle context for the DataAction

processUpdateModel

protected void processUpdateModel(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation processUpdateModel
Parameters:
actionContext - the lifecycle context for the DataAction

validateModelUpdates

protected void validateModelUpdates(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation validateModelUpdates
Parameters:
actionContext - the lifecycle context for the DataAction

initializeMethodParameters

protected void initializeMethodParameters(DataActionContext actionContext,
                                          oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
Deprecated. 
Delegate to the Struts page lifecycle implementation initializeMethodParameters
Parameters:
actionContext - the lifecycle context for the DataAction
actionBinding - the action binding object

invokeCustomMethod

protected void invokeCustomMethod(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation invokeCustomMethod
Parameters:
actionContext - the lifecycle context for the DataAction

refreshModel

protected void refreshModel(DataActionContext actionContext)
Deprecated. 
Delegate to the Struts page lifecycle implementation refreshModel
Parameters:
actionContext - the lifecycle context for the DataAction

findForward

protected void findForward(DataActionContext actionContext)
                    throws java.lang.Exception
Deprecated. 
Delegate to the Struts page lifecycle implementation findForward
Parameters:
actionContext - the lifecycle context for the DataAction
Throws:
java.lang.Exception

getEventMethod

protected java.lang.reflect.Method getEventMethod(DataActionContext actionContext,
                                                  java.lang.String eventName)
Deprecated. 
Delegate to the Struts page lifecycle implementation getEventMethod
Parameters:
actionContext - the lifecycle context for the DataAction
eventName - name of the event
Returns:
the Method object for this event if exist

saveErrors

protected void saveErrors(DataActionContext actionContext)
Deprecated. 
Save all the error message from the lifecycle context to the request attribute.
Parameters:
actionContext -

handleLifecycle

public final void handleLifecycle(LifecycleContext lcContext)
                           throws java.lang.Exception
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
handleLifecycle in interface Lifecycle
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception
See Also:
handleLifecycle(DataActionContext)

processComponentEvents

public final void processComponentEvents(LifecycleContext lcContext)
                                  throws java.lang.Exception
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
processComponentEvents in interface Lifecycle
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception
See Also:
processComponentEvents(DataActionContext)

hasErrors

public final boolean hasErrors(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
hasErrors in interface Lifecycle
Parameters:
lcContext - the lifecycle context
Returns:
true, if any validation errors have been stored in the LifecycleContext.
See Also:
hasErrors(DataActionContext)

handleError

public final void handleError(LifecycleContext lcContext,
                              java.lang.Exception ex)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
handleError in interface Lifecycle
Parameters:
lcContext - the lifecycle context
ex - the exception to record
See Also:
handleError(DataActionContext, Exception)

reportErrors

public final void reportErrors(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
reportErrors in interface Lifecycle
Parameters:
lcContext - the lifecycle context
See Also:
reportErrors(DataActionContext)

buildEventList

public final void buildEventList(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
buildEventList in interface Lifecycle
Parameters:
lcContext - the lifecycle context
See Also:
buildEventList(DataActionContext)

prepareModel

public final void prepareModel(LifecycleContext lcContext)
                        throws java.lang.Exception
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
prepareModel in interface Lifecycle
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception
See Also:
prepareModel(DataActionContext)

shouldAllowModelUpdate

public final boolean shouldAllowModelUpdate(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
shouldAllowModelUpdate in interface Lifecycle
Parameters:
lcContext - the lifecycle context.
Returns:
true, if the model should be updated during this lifecycle
See Also:
shouldAllowModelUpdate(DataActionContext)

processUpdateModel

public final void processUpdateModel(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
processUpdateModel in interface Lifecycle
Parameters:
lcContext - the lifecycle context
See Also:
processUpdateModel(DataActionContext)

validateModelUpdates

public final void validateModelUpdates(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
validateModelUpdates in interface Lifecycle
Parameters:
lcContext - the lifecycle context
See Also:
validateModelUpdates(DataActionContext)

initializeMethodParameters

public final void initializeMethodParameters(LifecycleContext lcContext,
                                             oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
initializeMethodParameters in interface Lifecycle
Parameters:
lcContext - the lifecycle context
actionBinding - the action binding object to initialize
See Also:
initializeMethodParameters(DataActionContext, JUCtrlActionBinding)

invokeCustomMethod

public final void invokeCustomMethod(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
invokeCustomMethod in interface Lifecycle
Parameters:
lcContext - the lifecycle context
See Also:
invokeCustomMethod(DataActionContext)

refreshModel

public final void refreshModel(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
refreshModel in interface Lifecycle
Parameters:
lcContext - the lifecycle context
See Also:
refreshModel(DataActionContext)

findForward

public final void findForward(LifecycleContext lcContext)
                       throws java.lang.Exception
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
findForward in interface Lifecycle
Parameters:
lcContext - the lifecycle context
Throws:
java.lang.Exception
See Also:
findForward(DataActionContext)

saveErrors

public final void saveErrors(LifecycleContext lcContext)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
See Also:
saveErrors(DataActionContext)

getEventMethod

public final java.lang.reflect.Method getEventMethod(LifecycleContext lcContext,
                                                     java.lang.String eventName)
Deprecated. 
Internal. Implement the Lifecycle interface and delegate to the DataAction with the proper DataActionContext parameter.
Specified by:
getEventMethod in interface Lifecycle
Parameters:
lcContext - the lifecycle context
eventName - name of the event
Returns:
the Method object for this event if exist
See Also:
getEventMethod(DataActionContext, String)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle
11g Release 2 (11.1.2.2.0)

E17481-03


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