|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 1 (11.1.1.7.0) E10652-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.action.Action oracle.adf.controller.struts.actions.DataAction
public class DataAction
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:
DCBindingContainer
based on
the XML binding definition for the UI model whose name is specified by
the modelReference
property in your Struts
DataActionMapping
type
attribute
in your respective Struts action mapping definition).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
.
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 |
---|
protected java.util.Map events
protected java.lang.Class clazz
protected java.lang.Class[] eventParam
Constructor Detail |
---|
public DataAction()
Method Detail |
---|
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
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.
execute
in class org.apache.struts.action.Action
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.
java.lang.Exception
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
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.
execute
in class org.apache.struts.action.Action
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.
java.lang.Exception
execute
protected final Lifecycle getPageLifecycle(DataActionContext actionContext)
DataActionMapping
is configured.
The implementation of the lifecycle differ based on the type of web page
that this action will service.
actionContext
- the lifecycle context for the DataActionStrutsPageLifecycle
,
StrutsUixLifecycle
protected void handleLifecycle(DataActionContext actionContext) throws java.lang.Exception
handleLifecycle
for JSP pages
and handleLifecycle
for UIX
pages.
actionContext
- the lifecycle context for the DataAction
java.lang.Exception
protected void processComponentEvents(DataActionContext actionContext) throws java.lang.Exception
processComponentEvents
actionContext
- the lifecycle context for the DataAction
java.lang.Exception
protected boolean hasErrors(DataActionContext actionContext)
hasErrors
actionContext
- the lifecycle context for the DataActionprotected void handleError(DataActionContext actionContext, java.lang.Exception ex)
handleError
actionContext
- the lifecycle context for the DataActionex
- the exception being thrownprotected void reportErrors(DataActionContext actionContext)
reportErrors
actionContext
- the lifecycle context for the DataActionprotected void buildEventList(DataActionContext actionContext)
buildEventList
actionContext
- the lifecycle context for the DataActionprotected void prepareModel(DataActionContext actionContext) throws java.lang.Exception
prepareModel
actionContext
- the lifecycle context for the DataAction
java.lang.Exception
protected boolean shouldAllowModelUpdate(DataActionContext actionContext)
shouldAllowModelUpdate
actionContext
- the lifecycle context for the DataActionprotected void processUpdateModel(DataActionContext actionContext)
processUpdateModel
actionContext
- the lifecycle context for the DataActionprotected void validateModelUpdates(DataActionContext actionContext)
validateModelUpdates
actionContext
- the lifecycle context for the DataActionprotected void initializeMethodParameters(DataActionContext actionContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
initializeMethodParameters
actionContext
- the lifecycle context for the DataActionactionBinding
- the action binding objectprotected void invokeCustomMethod(DataActionContext actionContext)
invokeCustomMethod
actionContext
- the lifecycle context for the DataActionprotected void refreshModel(DataActionContext actionContext)
refreshModel
actionContext
- the lifecycle context for the DataActionprotected void findForward(DataActionContext actionContext) throws java.lang.Exception
findForward
actionContext
- the lifecycle context for the DataAction
java.lang.Exception
protected java.lang.reflect.Method getEventMethod(DataActionContext actionContext, java.lang.String eventName)
getEventMethod
actionContext
- the lifecycle context for the DataActioneventName
- name of the event
protected void saveErrors(DataActionContext actionContext)
actionContext
- public final void handleLifecycle(LifecycleContext lcContext) throws java.lang.Exception
handleLifecycle
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
handleLifecycle(DataActionContext)
public final void processComponentEvents(LifecycleContext lcContext) throws java.lang.Exception
processComponentEvents
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
processComponentEvents(DataActionContext)
public final boolean hasErrors(LifecycleContext lcContext)
hasErrors
in interface Lifecycle
lcContext
- the lifecycle context
true
, if any validation errors have been
stored in the LifecycleContext.hasErrors(DataActionContext)
public final void handleError(LifecycleContext lcContext, java.lang.Exception ex)
handleError
in interface Lifecycle
lcContext
- the lifecycle contextex
- the exception to recordhandleError(DataActionContext, Exception)
public final void reportErrors(LifecycleContext lcContext)
reportErrors
in interface Lifecycle
lcContext
- the lifecycle contextreportErrors(DataActionContext)
public final void buildEventList(LifecycleContext lcContext)
buildEventList
in interface Lifecycle
lcContext
- the lifecycle contextbuildEventList(DataActionContext)
public final void prepareModel(LifecycleContext lcContext) throws java.lang.Exception
prepareModel
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
prepareModel(DataActionContext)
public final boolean shouldAllowModelUpdate(LifecycleContext lcContext)
shouldAllowModelUpdate
in interface Lifecycle
lcContext
- the lifecycle context.
true
, if the model should be updated
during this lifecycleshouldAllowModelUpdate(DataActionContext)
public final void processUpdateModel(LifecycleContext lcContext)
processUpdateModel
in interface Lifecycle
lcContext
- the lifecycle contextprocessUpdateModel(DataActionContext)
public final void validateModelUpdates(LifecycleContext lcContext)
validateModelUpdates
in interface Lifecycle
lcContext
- the lifecycle contextvalidateModelUpdates(DataActionContext)
public final void initializeMethodParameters(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
initializeMethodParameters
in interface Lifecycle
lcContext
- the lifecycle contextactionBinding
- the action binding object to initializeinitializeMethodParameters(DataActionContext, JUCtrlActionBinding)
public final void invokeCustomMethod(LifecycleContext lcContext)
invokeCustomMethod
in interface Lifecycle
lcContext
- the lifecycle contextinvokeCustomMethod(DataActionContext)
public final void refreshModel(LifecycleContext lcContext)
refreshModel
in interface Lifecycle
lcContext
- the lifecycle contextrefreshModel(DataActionContext)
public final void findForward(LifecycleContext lcContext) throws java.lang.Exception
findForward
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
findForward(DataActionContext)
public final void saveErrors(LifecycleContext lcContext)
saveErrors(DataActionContext)
public final java.lang.reflect.Method getEventMethod(LifecycleContext lcContext, java.lang.String eventName)
getEventMethod
in interface Lifecycle
lcContext
- the lifecycle contexteventName
- name of the event
getEventMethod(DataActionContext, String)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 1 (11.1.1.7.0) E10652-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |