|
Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
oracle.adf.controller.v2.lifecycle.Phases
oracle.adf.controller.v2.lifecycle.PageLifecycle
oracle.adf.controller.v2.lifecycle.PageLifecycleImpl
Implementation of the PageLifecycle abstract class.
This contain the base implementation of the Phases of the ADF Lifecycle.
| Field Summary | |
static java.lang.String |
DISABLE_VALIDATE_TOKENSA request-level property used to disable the token validation. |
static java.lang.String |
ordDomainInputHandlerNameA 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. In this method, the input values list and the event list are built. |
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. |
protected ControlBinding |
findCtrlBinding(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) |
protected java.lang.String |
getToken(PageLifecycleContext context, RegionBinding bindings)Retrieve the token from the request |
void |
handleError(PageLifecycleContext context, java.lang.Exception ex) |
protected boolean |
handleEvent(PageLifecycleContext context, java.lang.String event)Handle an event. |
boolean |
hasErrors(PageLifecycleContext context)Return true if an error occured during validation. The default implementation looks at the content of the ExceptionList of the BindingContainer to determine if an error occured. |
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, OperationBinding actionBinding) |
protected void |
initializeParameterValuesUsingRequestObject(PageLifecycleContext context, OperationBinding actionBinding)In model 1 we do not have a way to initialize method parameters. |
boolean |
invokeActionBinding(PageLifecycleContext context, java.lang.String event) |
boolean |
invokeEventMethod(PageLifecycleContext lcContext, java.lang.String eventName) |
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. Handle any events in the Events list previously built during the applyInputValues phase. |
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) |
boolean |
shouldAllowModelUpdate(PageLifecycleContext context) |
protected boolean |
shouldValidateToken(PageLifecycleContext context, 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)
PhasesvalidateInputValues 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)
JUCtrlActionBinding.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 Phasespublic boolean hasErrors(PageLifecycleContext context)
BindingContainer to determine if an error occured.
protected void initializeParameterValuesUsingRequestObject(PageLifecycleContext context,
OperationBinding actionBinding)
context - the Pagelifecycle contextactionBinding - the action binding to initialize
public void initializeMethodParameters(PageLifecycleContext context,
OperationBinding actionBinding)
context - the PageLifecycle contextactionBinding - the action binding object to initializepublic void metadataCommit(LifecycleContext lfContext)
PhasesmetadataCommit in class Phasespublic void prepareRender(LifecycleContext lfContext)
PhasesDuring this phase the model is refreshed.
prepareRender in class Phases
public void handleError(PageLifecycleContext context,
java.lang.Exception ex)
public void reportErrors(PageLifecycleContext context)
protected java.lang.String getToken(PageLifecycleContext context,
RegionBinding bindings)
protected boolean shouldValidateToken(PageLifecycleContext context,
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 ControlBinding findCtrlBinding(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 handletrue if the event was mapped to an action bindingjava.lang.ExceptionbuildEventList, PageLifecycleContext.EVENT_METHOD_PREFIX
public java.lang.reflect.Method getEventMethod(PageLifecycleContext lcContext,
java.lang.String eventName)
lcContext - the PageLifecycle contexteventName - name of the event
public boolean invokeEventMethod(PageLifecycleContext lcContext,
java.lang.String eventName)
throws java.lang.Exception
lcContext - the PageLifecycle contexteventName - name of the eventjava.lang.Exception
public boolean invokeActionBinding(PageLifecycleContext context,
java.lang.String event)
context - the lifecycle contextevent - the name of the eventtrue if an action binding is associated with the event
public void findForward(PageLifecycleContext context)
throws java.lang.Exception
PageLifecyclefindForward in class PageLifecyclejava.lang.Exception
|
Oracle Application Development Framework Lifecycle Java API Reference 10g Release 3 (10.1.3) B25779-01 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||