|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 1 (11.1.1.4.0) E10652-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.adf.controller.v2.lifecycle.Phases
oracle.adf.controller.v2.lifecycle.PageLifecycle
oracle.adf.controller.v2.lifecycle.PageLifecycleImpl
public class PageLifecycleImpl
Implementation of the PageLifecycle abstract class.
Phases of the ADF
Lifecycle.
| Field Summary | |
|---|---|
static java.lang.String |
DISABLE_VALIDATE_TOKENS
A request-level property used to disable the token validation. |
static java.lang.String |
ordDomainInputHandlerName
A custom input handler used by bindings dealing with ord domain type. |
| Fields inherited from class oracle.adf.controller.v2.lifecycle.PageLifecycle |
|---|
clazz, eventParam, events |
| Constructor Summary | |
|---|---|
PageLifecycleImpl()
|
|
| Method Summary | |
|---|---|
void |
applyInputValues(LifecycleContext lfContext)
Builds the list of events with their possible associated action binding from the request parameters. |
protected void |
buildEventList(PageLifecycleContext context)
Possible events are request parameters named "event" or which name are prefixed with "event_". |
protected void |
buildInputValues(PageLifecycleContext context)
Build a list of all the new submited ADF values from the request parameters. |
protected void |
disableTokenValidationForRequest(PageLifecycleContext context)
Token validation will only occur once-per-request. |
void |
executeEvent(PageLifecycleContext context,
java.lang.String event,
oracle.adf.model.OperationBinding actionBinding)
Execute a single event. |
protected oracle.adf.model.ControlBinding |
findCtrlBinding(oracle.adf.model.RegionBinding bindings,
java.lang.String event)
Look action binding with the name 'name' or 'Name' |
void |
findForward(PageLifecycleContext context)
The path of the next web page is identified using the forwardPath property on the PageLifecycleContext. |
java.lang.reflect.Method |
getEventMethod(PageLifecycleContext lcContext,
java.lang.String eventName)
Retrieve the Method class for a given an event name. |
protected java.lang.String |
getToken(PageLifecycleContext context,
oracle.adf.model.RegionBinding bindings)
Retrieve the token from the request |
void |
handleError(PageLifecycleContext context,
java.lang.Exception ex)
Handles any exceptions that occurred during the PageLifecycle processing. |
protected boolean |
handleEvent(PageLifecycleContext context,
java.lang.String event)
Handle an event. |
boolean |
hasErrors(PageLifecycleContext context)
Return true if an error occured during validation. |
void |
initContext(LifecycleContext lfContext)
During this phase the listener is able to initialize the LifecycleContext
with additional information that will be persisted during the Lifecycle. |
void |
initializeMethodParameters(PageLifecycleContext context,
oracle.adf.model.OperationBinding actionBinding)
This method is invoked before any ControlBinding or custom method is being executed. |
protected void |
initializeParameterValuesUsingRequestObject(PageLifecycleContext context,
oracle.adf.model.OperationBinding actionBinding)
In model 1 we do not have a way to initialize method parameters. |
boolean |
invokeActionBinding(PageLifecycleContext context,
java.lang.String event)
Invoke the action binding associated with the event name. |
boolean |
invokeEventMethod(PageLifecycleContext lcContext,
java.lang.String eventName)
Execute the Method class for a given an event name. |
protected boolean |
isRecoverableException(java.lang.Exception ex)
Determine if the exception can be handled by ADF or should thrown right away. |
void |
metadataCommit(LifecycleContext lfContext)
Used to commit Runtime changes to the metadata. |
void |
prepareModel(LifecycleContext lfContext)
Give the opportunity for the data model to prepare and initialize. |
void |
prepareRender(LifecycleContext lfContext)
Last phase before rendering a page. |
void |
processComponentEvents(LifecycleContext lfContext)
Process each event accumulated during the previous phases. |
protected void |
processEvent(PageLifecycleContext context,
java.lang.String event)
Process a possible raw event coming as a request parameter. |
void |
processUpdateModel(LifecycleContext lfContext)
Update the data model with new and validated input values. |
protected void |
registerCustomInputHandler(PageLifecycleContext context)
Register OrdDomainInputHandler custom input handler to the binding context. |
void |
reportErrors(PageLifecycleContext context)
Provide the opportunity to build an error list in a format appropriate to the view layer. |
boolean |
shouldAllowModelUpdate(PageLifecycleContext context)
This method is called during the processUpdateModel phase. |
protected boolean |
shouldValidateToken(PageLifecycleContext context,
oracle.adf.model.RegionBinding bindings)
Checks the request object to see if token validation should occur. |
void |
validateInputValues(LifecycleContext lfContext)
Validate input values. |
void |
validateModelUpdates(LifecycleContext lfContext)
Forces model-level validation to occur. |
| Methods inherited from class oracle.adf.controller.v2.lifecycle.PageLifecycle |
|---|
getEventMethodFromCache, getLifecycleContextClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DISABLE_VALIDATE_TOKENS
public static final java.lang.String ordDomainInputHandlerName
| Constructor Detail |
|---|
public PageLifecycleImpl()
| Method Detail |
|---|
public void initContext(LifecycleContext lfContext)
PhasesLifecycleContext
with additional information that will be persisted during the Lifecycle.
initContext in class Phasespublic void prepareModel(LifecycleContext lfContext)
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 class Phasespublic void applyInputValues(LifecycleContext lfContext)
applyInputValues in class Phasespublic void validateInputValues(LifecycleContext lfContext)
Phases
validateInputValues in class Phasespublic void processUpdateModel(LifecycleContext lfContext)
This phase is executed only if the
shouldAllowModelUpdate method returns
true.
In case of error when setting the value to the model the errors will not be thrown but collected in the binding container.
processUpdateModel in class Phasespublic boolean shouldAllowModelUpdate(PageLifecycleContext context)
PageLifecycle
shouldAllowModelUpdate in class PageLifecycleJUCtrlActionBinding.ignoreUpdates()public void validateModelUpdates(LifecycleContext lfContext)
This phase is executed only if the
shouldAllowModelUpdate method returns
true.
validateModelUpdates in class Phasespublic void processComponentEvents(LifecycleContext lfContext)
Events
list previously built during the applyInputValues
phase.
processComponentEvents in class Phases
public void executeEvent(PageLifecycleContext context,
java.lang.String event,
oracle.adf.model.OperationBinding actionBinding)
PageLifecycle
executeEvent in class PageLifecyclehandleEvent.public boolean hasErrors(PageLifecycleContext context)
BindingContainer to
determine if an error occured.
hasErrors in class PageLifecycle
protected void initializeParameterValuesUsingRequestObject(PageLifecycleContext context,
oracle.adf.model.OperationBinding actionBinding)
context - the Pagelifecycle contextactionBinding - the action binding to initialize
public void initializeMethodParameters(PageLifecycleContext context,
oracle.adf.model.OperationBinding actionBinding)
PageLifecycle
initializeMethodParameters in class PageLifecyclecontext - the PageLifecycle contextactionBinding - the action binding object to initializepublic void metadataCommit(LifecycleContext lfContext)
Phases
metadataCommit in class Phasespublic void prepareRender(LifecycleContext lfContext)
PhasesDuring this phase the model is refreshed.
prepareRender in class Phasesprotected boolean isRecoverableException(java.lang.Exception ex)
ex -
public void handleError(PageLifecycleContext context,
java.lang.Exception ex)
PageLifecycleBindingContainer.
handleError in class PageLifecyclepublic void reportErrors(PageLifecycleContext context)
PageLifecycle
reportErrors in class PageLifecycle
protected java.lang.String getToken(PageLifecycleContext context,
oracle.adf.model.RegionBinding bindings)
protected boolean shouldValidateToken(PageLifecycleContext context,
oracle.adf.model.RegionBinding bindings)
protected void disableTokenValidationForRequest(PageLifecycleContext context)
DISABLE_VALIDATE_TOKENS
protected void processEvent(PageLifecycleContext context,
java.lang.String event)
context - the Pagelifecycle contextevent - the event name
protected oracle.adf.model.ControlBinding findCtrlBinding(oracle.adf.model.RegionBinding bindings,
java.lang.String event)
bindings - the binding containerevent - the event nameprotected void buildInputValues(PageLifecycleContext context)
Build a list of all the new submited ADF values from the request parameters.
The result is a Map of values keyed by binding instance stored in theUpdatedValues property.
context - the Pagelifecycle contextprotected void buildEventList(PageLifecycleContext context)
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.
addControlActionBinding,
getControlActionBindings,
addEvent,
getEventsprotected void registerCustomInputHandler(PageLifecycleContext context)
protected boolean handleEvent(PageLifecycleContext context,
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().invoke();
}
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.
context - the PageLifecycle contextevent - the name of the event to handle
true if the event was mapped to an action binding
java.lang.ExceptionbuildEventList,
PageLifecycleContext.EVENT_METHOD_PREFIX
public java.lang.reflect.Method getEventMethod(PageLifecycleContext lcContext,
java.lang.String eventName)
PageLifecycle
lcContext - the PageLifecycle contexteventName - name of the event
public boolean invokeEventMethod(PageLifecycleContext lcContext,
java.lang.String eventName)
throws java.lang.Exception
PageLifecycle
lcContext - the PageLifecycle contexteventName - name of the event
java.lang.Exception
public boolean invokeActionBinding(PageLifecycleContext context,
java.lang.String event)
PageLifecycleAn action binding is associated with an event if an action binding with
the same name as the event exist in the current binding container. If the
action binding exist, the method parameters are initialized using the
initializeMethodParameters method on
the PageLifecycle before executing the action binding.
true
context - the lifecycle contextevent - the name of the event
true if an action binding is associated
with the event
public void findForward(PageLifecycleContext context)
throws java.lang.Exception
PageLifecycle
findForward in class PageLifecyclejava.lang.Exception
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 1 (11.1.1.4.0) E10652-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||