|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 1 (11.1.1.6.0) E10652-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.controller.lifecycle.PageLifecycle
public class PageLifecycle
Implementation of the Lifecycle for web pages.
It provide the base functionality that is extended when used with a
controller like Jakarta Struts.
See StrutsPageLifecycle
.
When used without a controller, each JSP require to add a tag
<adf:uimodelreference model="pageUIModel" />at the top of the page to bootstrap the page lifecycle and define the binding container associated with the page.
Field Summary | |
---|---|
protected java.lang.Class |
clazz
Deprecated. The Class instance for this class (PageLifecycle). |
static java.lang.String |
DISABLE_VALIDATE_TOKENS
Deprecated. A request-level property used to disable the token validation. |
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. |
static java.lang.String |
ordDomainInputHandlerName
Deprecated. A custom input handler used by bindings dealing with ord domain type |
Constructor Summary | |
---|---|
PageLifecycle()
Deprecated. |
Method Summary | |
---|---|
void |
buildEventList(LifecycleContext lcContext)
Deprecated. Builds the list of events with their possible associated action binding from the request parameters. |
protected void |
disableTokenValidationForRequest(javax.servlet.http.HttpServletRequest request)
Deprecated. Token validation will only occur once-per-request. |
protected oracle.adf.model.binding.DCControlBinding |
findCtrlBinding(oracle.adf.model.binding.DCBindingContainer bindings,
java.lang.String event)
Deprecated. Look action binding with the name 'name' or 'Name' |
void |
findForward(LifecycleContext lcContext)
Deprecated. 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)
Deprecated. Retrieve the Method class for an event name. |
static java.lang.reflect.Method |
getEventMethodFromCache(java.util.Map events,
java.lang.Class clazz,
java.lang.Class[] eventParams,
java.lang.String eventName)
Deprecated. Internal |
protected java.util.Map |
getRequestValues(LifecycleContext lcContext)
Deprecated. Returns all the submited ADF values from the request parameters. |
void |
handleError(LifecycleContext lcContext,
java.lang.Exception ex)
Deprecated. Handles any exceptions that occurred during the Lifecycle processing. |
protected boolean |
handleEvent(LifecycleContext lcContext,
java.lang.String event)
Deprecated. Handle an event. |
void |
handleLifecycle(LifecycleContext lcContext)
Deprecated. Define all the phases of the lifecycle and the order they are executed. |
boolean |
hasErrors(LifecycleContext lcContext)
Deprecated. Ask the context if any errors have been recorded during this lifecycle. |
void |
initializeMethodParameters(LifecycleContext lcContext,
oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
Deprecated. This method is invoked before any ControlBinding or custom method is being executed. |
protected void |
initializeParameterValuesUsingRequestObject(LifecycleContext lcContext,
oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
Deprecated. In model 1 we do not have a way to initialize method parameters. |
boolean |
invokeActionBinding(LifecycleContext lcContext,
java.lang.String event)
Deprecated. Invoke the action binding associated with the event name. |
void |
invokeCustomMethod(LifecycleContext lcContext)
Deprecated. Invokes the custom method associated with the binding container. |
protected boolean |
isNewValueForBinding(oracle.jbo.uicli.binding.JUCtrlValueBinding binding,
java.lang.Object value)
Deprecated. Use InputHandler. |
void |
prepareModel(LifecycleContext lcContext)
Deprecated. Give the opportunity for the data model to prepare and initialize. |
void |
processComponentEvents(LifecycleContext lcContext)
Deprecated. Handle any events in the action binding list previously built in processUpdateModel using the buildEventList method. |
protected void |
processEvent(LifecycleContext lcContext,
java.lang.String event)
Deprecated. Process a possible raw event coming as a request parameter. |
void |
processUpdateModel(LifecycleContext lcContext)
Deprecated. Update the data model with values submitted in the request. |
void |
refreshModel(LifecycleContext lcContext)
Deprecated. Used to notify the model when updates are over with. |
void |
reportErrors(LifecycleContext lcContext)
Deprecated. Report the error list to the view layer. |
protected void |
setInputValue(oracle.jbo.uicli.binding.JUCtrlValueBinding binding,
java.lang.Object value)
Deprecated. Use InputHandler. |
boolean |
shouldAllowModelUpdate(LifecycleContext lcContext)
Deprecated. Allows clients to determine whether the model should be updated. |
protected boolean |
shouldValidateToken(javax.servlet.http.HttpServletRequest request,
oracle.adf.model.binding.DCBindingContainer bindings)
Deprecated. Checks the request object to see if token validation should occur. |
protected void |
updateModel(LifecycleContext lcContext,
java.util.Map updatedValues)
Deprecated. Apply each new values to the binding. |
void |
validateModelUpdates(LifecycleContext lcContext)
Deprecated. Forces model-level validation to occur. |
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
public static final java.lang.String ordDomainInputHandlerName
public static final java.lang.String DISABLE_VALIDATE_TOKENS
Constructor Detail |
---|
public PageLifecycle()
Method Detail |
---|
public void handleLifecycle(LifecycleContext lcContext) throws java.lang.Exception
Define the steps of the PageLifecycle processing:
handleLifecycle
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
public void prepareModel(LifecycleContext lcContext) throws java.lang.Exception
If you need to set bind variable values on query objects in the business services layer in order to properly prepare the model, then you can set them by overriding this method and doing it before calling the superclass.
If you need to reference prepared model values and/or update the values of any bindings in the binding container, then you can do it by overriding this method and doing it after calling the superclass.
prepareModel
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
protected void disableTokenValidationForRequest(javax.servlet.http.HttpServletRequest request)
request
- protected boolean shouldValidateToken(javax.servlet.http.HttpServletRequest request, oracle.adf.model.binding.DCBindingContainer bindings)
request
- bindings
-
public void processUpdateModel(LifecycleContext lcContext)
Collect the new values from request parameters and update the model with them. Only new values are set to the bindings.
processUpdateModel
in interface Lifecycle
lcContext
- the lifecycle contextprotected void updateModel(LifecycleContext lcContext, java.util.Map updatedValues)
lcContext
- the lifecycle contextupdatedValues
- the map of values keyed by property namegetRequestValues(oracle.adf.controller.lifecycle.LifecycleContext)
protected boolean isNewValueForBinding(oracle.jbo.uicli.binding.JUCtrlValueBinding binding, java.lang.Object value)
true
if the value is different from the current value
of the binding.
binding
- the value binding to testvalue
- the new value for this binding
true
if the value is newprotected void setInputValue(oracle.jbo.uicli.binding.JUCtrlValueBinding binding, java.lang.Object value)
binding
- the binding that will receive the valuevalue
- the value to set to the bindingprotected java.util.Map getRequestValues(LifecycleContext lcContext)
DCUtil.isValueBindingPath(java.lang.String)
).
lcContext
- the lifecycle context
public boolean shouldAllowModelUpdate(LifecycleContext lcContext)
Disable data model updates in two cases:
shouldAllowModelUpdate
in interface Lifecycle
lcContext
- the lifecycle context.
true
, if the model should be updated
during this lifecycleJUCtrlActionBinding.ignoreUpdates()
public void validateModelUpdates(LifecycleContext lcContext)
validateModelUpdates
in interface Lifecycle
lcContext
- the lifecycle contextpublic void processComponentEvents(LifecycleContext lcContext) throws java.lang.Exception
Lifecycle
processComponentEvents
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
protected boolean handleEvent(LifecycleContext lcContext, java.lang.String event) throws java.lang.Exception
public void onEvent(LifecycleContext ctx) { // Use the following method to execute the possible // action binding associated with this event ctx.getEventActionBinding().doit(); }Where Event is the name of the event.
An event can also be an action binding with the same name of the event present in the current binding container.
lcContext
- the lifecycle contextevent
- the name of the event to handle
true
if the event was mapped to an action binding
java.lang.Exception
buildEventList
,
LifecycleContext.EVENT_METHOD_PREFIX
public java.lang.reflect.Method getEventMethod(LifecycleContext lcContext, java.lang.String name)
getEventMethod
in interface Lifecycle
lcContext
- the lifecycle contextname
- name of the event
protected void initializeParameterValuesUsingRequestObject(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
lcContext
- the lifecycle contextactionBinding
- the action binding to initializepublic void initializeMethodParameters(LifecycleContext lcContext, oracle.jbo.uicli.binding.JUCtrlActionBinding actionBinding)
Lifecycle
initializeMethodParameters
in interface Lifecycle
lcContext
- the lifecycle contextactionBinding
- the action binding object to initializepublic boolean invokeActionBinding(LifecycleContext lcContext, java.lang.String event)
initializeMethodParameters
method on
the lifecycle before executing the action binding.true
lcContext
- the lifecycle contextevent
- the name of the event
true
if an action binding is associated
with the eventpublic void invokeCustomMethod(LifecycleContext lcContext)
Lifecycle
invokeCustomMethod
in interface Lifecycle
lcContext
- the lifecycle contextpublic boolean hasErrors(LifecycleContext lcContext)
Lifecycle
hasErrors
in interface Lifecycle
lcContext
- the lifecycle context
true
, if any validation errors have been
stored in the LifecycleContext.public void refreshModel(LifecycleContext lcContext)
Lifecycle
refreshModel
in interface Lifecycle
lcContext
- the lifecycle contextpublic void handleError(LifecycleContext lcContext, java.lang.Exception ex)
handleError
in interface Lifecycle
lcContext
- the lifecycle contextex
- the exception to recordpublic void reportErrors(LifecycleContext lcContext)
Lifecycle
reportErrors
in interface Lifecycle
lcContext
- the lifecycle contextpublic void buildEventList(LifecycleContext lcContext)
The "event" prefix can be modified using
setEventPrefix
By doing this once and storing the result in the lifecycle context we don't have to walk through the request parameter list multiple time during the lifecycle.
buildEventList
in interface Lifecycle
lcContext
- the lifecycle contextaddControlActionBinding
,
getControlActionBindings
,
addEvent
,
getEvents
protected void processEvent(LifecycleContext lcContext, java.lang.String event)
lcContext
- the lifecycle contextevent
- the event nameprotected oracle.adf.model.binding.DCControlBinding findCtrlBinding(oracle.adf.model.binding.DCBindingContainer bindings, java.lang.String event)
bindings
- the binding containerevent
- the event name
public void findForward(LifecycleContext lcContext) throws java.lang.Exception
findForward
in interface Lifecycle
lcContext
- the lifecycle context
java.lang.Exception
public static final java.lang.reflect.Method getEventMethodFromCache(java.util.Map events, java.lang.Class clazz, java.lang.Class[] eventParams, java.lang.String eventName)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 1 (11.1.1.6.0) E10652-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |