|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 2 (11.1.2.0.0) E17481-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.controller.v2.context.LifecycleContext oracle.adf.controller.v2.context.PageLifecycleContext
public class PageLifecycleContext
PageLifecycleContext
contains all the state information that
will be kept during the PageLifecycle. It is passed as a parameter of each
phase execution.
Since it extends the HashMap class it can be use to append additional user data.
This context object lives for the duration of the current Lifecycle.
Field Summary | |
---|---|
protected static java.lang.String |
ACTION_BINDING_KEY
|
protected static java.lang.String |
ALLOW_MODEL_UPDATE_KEY
|
protected static java.lang.String |
CONTROL_ACTION_BINDINGS_KEY
|
static java.lang.String |
EVENT_METHOD_PREFIX
Prefix used for each event method. |
static java.lang.String |
EVENT_PREFIX
The default value to be used by the lifecycle to reconize an event in a parameter name. |
protected static java.lang.String |
EVENT_PREFIX_KEY
|
protected static java.lang.String |
EVENTS_KEY
|
protected static java.lang.String |
FORWARD_PATH_BINDINGS_KEY
|
protected static java.lang.String |
REDIRECT_BINDINGS_KEY
|
protected static java.lang.String |
UPDATED_VALUES_KEY
|
protected static java.lang.String |
VALIDATE_ERROR_KEY
|
Fields inherited from class oracle.adf.controller.v2.context.LifecycleContext |
---|
envMap, PAGE_LIFECYCLE_KEY, PATH_KEY |
Constructor Summary | |
---|---|
|
PageLifecycleContext(java.util.Map envMap)
|
protected |
PageLifecycleContext(java.util.Map envMap,
boolean initController)
|
Method Summary | |
---|---|
void |
addControlActionBinding(java.lang.String event,
oracle.adf.model.OperationBinding actionBinding)
This method add an action binding to the collection of action being executed. |
void |
addEvent(java.lang.String event)
Add an event name to the list of event to be handled during this lifecycle. |
java.util.Map |
getControlActionBindings()
Retrieve a list of all action binding keyed by event name. |
oracle.adf.model.OperationBinding |
getEventActionBinding()
Retrieve the ActionBinding associated with the current event. |
java.lang.String |
getEventPrefix()
Retrieve the event prefix from the context. |
java.util.List |
getEvents()
Retrieve the list of event names to be handled during this lifecycle. |
java.lang.String |
getForwardPath()
Retrieve the path of the page that the Lifecycle will forward to. |
java.util.Map |
getInputValidationErrors()
Retrieve errors that occured during validateInputValues phase |
java.util.Map |
getParameterMap()
Retrieve a map of the parameters for the current request. |
boolean |
getRedirect()
Retrieve the redirect setting from the context. |
java.util.Map |
getUpdatedValues()
|
void |
setEventActionBinding(oracle.adf.model.OperationBinding action)
Set the ActionBinding for the current event. |
void |
setEventPrefix(java.lang.String prefix)
Set the prefix that will be used to reconize event request parameters. |
void |
setForwardPath(java.lang.String path)
Set the path of the page to which the Lifecycle should forward. |
void |
setInputValidationErrors(java.util.Map errors)
Cache errors occuring during validateInputValues phase |
void |
setRedirect(boolean redirect)
Specify if the page path information defined using the setForwardPath should be use to forward the request or redirect the response. |
void |
setUpdatedValues(java.util.Map updatedValues)
|
Methods inherited from class oracle.adf.controller.v2.context.LifecycleContext |
---|
getBindingContainer, getBindingContext, getCurrentInstance, getEnvironment, getInstance, getInstance, getPageController, getPageLifecycle, getPagePhaseListener, getPath, getPrepareRender, initControllerClass, prepareRender, resetControllerClass, setPageController, setPageLifecycle, setPagePhaseListener, setPath |
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 EVENT_PREFIX
public static final java.lang.String EVENT_METHOD_PREFIX
protected static final java.lang.String UPDATED_VALUES_KEY
protected static final java.lang.String VALIDATE_ERROR_KEY
protected static final java.lang.String CONTROL_ACTION_BINDINGS_KEY
protected static final java.lang.String EVENT_PREFIX_KEY
protected static final java.lang.String EVENTS_KEY
protected static final java.lang.String ACTION_BINDING_KEY
protected static final java.lang.String ALLOW_MODEL_UPDATE_KEY
protected static final java.lang.String FORWARD_PATH_BINDINGS_KEY
protected static final java.lang.String REDIRECT_BINDINGS_KEY
Constructor Detail |
---|
public PageLifecycleContext(java.util.Map envMap)
protected PageLifecycleContext(java.util.Map envMap, boolean initController)
Method Detail |
---|
public java.util.Map getParameterMap()
public void setUpdatedValues(java.util.Map updatedValues)
public java.util.Map getUpdatedValues()
public void setInputValidationErrors(java.util.Map errors)
public java.util.Map getInputValidationErrors()
public void addControlActionBinding(java.lang.String event, oracle.adf.model.OperationBinding actionBinding)
event
- an event nameactionBinding
- the action binding to be associated with the eventpublic java.util.Map getControlActionBindings()
public void addEvent(java.lang.String event)
event
- an event namepublic java.util.List getEvents()
Phases.applyInputValues(oracle.adf.controller.v2.context.LifecycleContext)
public void setEventActionBinding(oracle.adf.model.OperationBinding action)
action
- Action binding to invoke as the event's default action.public oracle.adf.model.OperationBinding getEventActionBinding()
Here is an example for an event named Commit:
public void onCommit(PageLifecycleContext ctx) { // write pre-execution logic here ctx.getEventActionBinding().invoke(); // write post-execution logic here }
Return null is no ActionBinding is associated with this event.
public void setEventPrefix(java.lang.String prefix)
Set the prefix that will be used to reconize event request parameters. To change the default prefix "event", call this method with a different prefix every time the lifecycle context is initialized.
?event=xxx
name="event_xxx"
prefix
- the new prefix stringEVENT_PREFIX
public java.lang.String getEventPrefix()
EVENT_PREFIX
public void setForwardPath(java.lang.String path)
path
- Relative path of next page.PageLifecycle.findForward(oracle.adf.controller.v2.context.PageLifecycleContext)
,
setRedirect(boolean)
public java.lang.String getForwardPath()
PageLifecycle.findForward(oracle.adf.controller.v2.context.PageLifecycleContext)
public void setRedirect(boolean redirect)
redirect
- a booleansetForwardPath(java.lang.String)
,
PageLifecycle.findForward(oracle.adf.controller.v2.context.PageLifecycleContext)
public boolean getRedirect()
setRedirect(boolean)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle 11g Release 2 (11.1.2.0.0) E17481-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |