|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.iplanet.jato.view.ViewBase
|
+--com.iplanet.jato.view.ContainerViewBase
|
+--com.iplanet.jato.view.RequestHandlingViewBase
An intermediate View derivation that supports request handling and handling of web actions. It is a separate class to support potentially several subclasses that wish to take advantage of this behavior but may differ in other significant ways.
| Field Summary | |
static java.lang.String |
HANDLE_REQUEST_METHOD_PREFIX
|
static java.lang.String |
HANDLE_REQUEST_METHOD_SUFFIX
|
| Fields inherited from class com.iplanet.jato.view.ContainerViewBase |
BEGIN_DISPLAY_EVENT_METHOD_PREFIX, BEGIN_DISPLAY_EVENT_METHOD_SUFFIX, END_DISPLAY_EVENT_METHOD_PREFIX, END_DISPLAY_EVENT_METHOD_SUFFIX, eventMethodRegistry, OPTION_ENABLE_QUALIFIELD_CHILD_NAME_LOOKUPS, OPTION_USE_LEGACY_DISPLAY_EVENT_SIGNATURES |
| Fields inherited from interface com.iplanet.jato.view.WebActionHandler |
DELETE_CONTEXT, EXECUTE_CONTEXT, INSERT_CONTEXT, MODEL_TYPE_DELETE, MODEL_TYPE_EXECUTE, MODEL_TYPE_INSERT, MODEL_TYPE_RETRIEVE, MODEL_TYPE_UPDATE, RETRIEVE_CONTEXT, UPDATE_CONTEXT |
| Fields inherited from interface com.iplanet.jato.view.WebActions |
ACTION_CLEAR, ACTION_DELETE, ACTION_EXECUTE, ACTION_FIRST, ACTION_INSERT, ACTION_LAST, ACTION_NEXT, ACTION_PREV, ACTION_PREVIOUS, ACTION_REFRESH, ACTION_SELECT, ACTION_UPDATE |
| Fields inherited from interface com.iplanet.jato.view.View |
QUALIFIED_VIEW_NAME_SEPARATOR |
| Constructor Summary | |
RequestHandlingViewBase(View parent,
java.lang.String name)
Creates an instance with a parent and name |
|
| Method Summary | |
java.lang.Object |
acceptRequest(javax.servlet.http.HttpServletRequest request)
This method is used by the application servlet to determine if this is the appropriate view to handle the servlet request. |
void |
afterAllModelsExecute(int executionContext)
Invoked as notification that all auto-executing models have been executed. |
void |
afterModelExecutes(Model model,
int executionContext)
Invoked as notification that a given model has been auto-executed. |
void |
appMessage(java.lang.String message)
Convenience method to make obtaining the MessageWriter instance from the RequestContext easier. |
boolean |
beforeModelExecutes(Model model,
int executionContext)
Invoked as notification that a given model is about to be auto-executed. |
void |
beginDisplay(DisplayEvent event)
Called as notification that the JSP has begun its display processing. |
protected DatasetModelExecutionContext |
createDefaultExecutionContext()
Creates and returns an execution used for auto-retrieval. |
java.lang.Object |
executeAutoDeletingModel(ModelExecutionContext context,
Model m)
Executes the specified deleting model. |
void |
executeAutoDeletingModels(ModelExecutionContext context)
Executes all of this view's deleting models. |
java.lang.Object |
executeAutoExecutingModel(ModelExecutionContext context,
Model m)
Executes the specified executing model. |
void |
executeAutoExecutingModels(ModelExecutionContext context)
Executes all of this view's executing models. |
java.lang.Object |
executeAutoInsertingModel(ModelExecutionContext context,
Model m)
Executes the specified inserting model. |
void |
executeAutoInsertingModels(ModelExecutionContext context)
Executes all of this view's inserting models. |
java.lang.Object |
executeAutoRetrievingModel(DatasetModelExecutionContext context,
Model m)
Executes the specified retrieving model. |
void |
executeAutoRetrievingModels()
Executes all of this view's auto-retrieving models. |
void |
executeAutoRetrievingModels(DatasetModelExecutionContext context)
Executes all of this view's auto-retrieving models. |
java.lang.Object |
executeAutoUpdatingModel(ModelExecutionContext context,
Model m)
Executes the specified updating model. |
void |
executeAutoUpdatingModels(ModelExecutionContext context)
Executes all of this view's updating models. |
protected DatasetModelExecutionContext |
getAutoRetrieveExecutionContext()
Returns the current auto-retrieval execution context, if present. |
DatasetModelExecutionContext |
getFirstActionExecutionContext()
Returns an execution context suitable to the first web action. |
DatasetModelExecutionContext |
getLastActionExecutionContext()
Returns an execution context suitable to the last web action. |
Model |
getModel(java.lang.Class clazz)
Convenience method to make obtaining a model instance by its default name from the ModelManager easier. |
DatasetModelExecutionContext |
getNextActionExecutionContext()
Returns an execution context suitable to the next web action. |
DatasetModelExecutionContext |
getPreviousActionExecutionContext()
Returns an execution context suitable to the previous web action. |
DatasetModelExecutionContext |
getRefreshActionExecutionContext()
Returns an execution context suitable to the refresh web action. |
java.lang.String[] |
getRequestCompletionListenerChildNames()
Returns the names of registered children that are of type
RequestParticipant. |
RequestContext |
getRequestContext()
Returns the current request context. |
java.lang.String[] |
getRequestParticipantChildNames()
Returns the names of registered children that are of type
RequestParticipant. |
javax.servlet.http.HttpSession |
getSession()
Convenience method to make obtaining the HttpSession instance from the RequestContext easier. |
ViewBean |
getViewBean(java.lang.Class clazz)
Convenience method to make obtaining a view bean instance from the
ViewBeanManager easier. |
protected int |
getWebActionModelOffset()
|
Model[] |
getWebActionModels(int executionType)
Return the web action models associated with this view by execution type. |
protected java.lang.String |
getWebActionRowOffsetSessionKey()
Returns the session attribute key used to store the row offset of this view for the user. |
void |
handleRequest(java.lang.Object anInvocation)
Called by the application servlet to have the request handler process this request. |
void |
handleWebAction(int actionType)
Performs the specified standard web action. |
boolean |
isAutoRetrieveEnabled()
Returns the state of auto-retrieval. |
void |
onModelError(Model model,
int executionContext,
ModelControlException exception)
Invoked as notification that a given model threw a
ModelControlException during auto-execution. |
void |
onNoModelDataAvailable(Model model,
int executionContext)
Deprecated. This method is no longer supported |
void |
requestComplete()
Called upon notification that the current request is complete. |
void |
setAutoRetrieveEnabled(boolean autoRetrieveEnabled)
Sets the state of auto-retrieval for this request. |
protected void |
setAutoRetrieveExecutionContext(DatasetModelExecutionContext value)
Sets the current auto-retrieval execution context. |
void |
setRequestContext(RequestContext value)
Sets the current request context. |
protected void |
setWebActionModelOffset(int value)
|
| Methods inherited from class com.iplanet.jato.view.ViewBase |
getName, getParent, getParentViewBean, getQualifiedName, getRootView, getRootView, setName, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.iplanet.jato.view.View |
getName, getParent, getQualifiedName, setParent |
| Field Detail |
public static final java.lang.String HANDLE_REQUEST_METHOD_PREFIX
public static final java.lang.String HANDLE_REQUEST_METHOD_SUFFIX
| Constructor Detail |
public RequestHandlingViewBase(View parent,
java.lang.String name)
parent - The parent view or null if this view has no parentname - The logical name of this view| Method Detail |
public java.lang.String[] getRequestParticipantChildNames()
RequestParticipant.RequestParticipantpublic java.lang.String[] getRequestCompletionListenerChildNames()
RequestParticipant.RequestCompletionListenerpublic RequestContext getRequestContext()
getRequestContext in interface RequestHandlerpublic void setRequestContext(RequestContext value)
RequestParticipant.setRequestContext in interface RequestParticipantvalue - The request contextpublic void requestComplete()
RequestCompletionListener.requestComplete in interface RequestCompletionListenerpublic java.lang.Object acceptRequest(javax.servlet.http.HttpServletRequest request)
RequestHandlerCommandField display fields generated this request,
and return an invocation object describing the invocation.acceptRequest in interface RequestHandlerhandleRequest() method of this implementation.
This implementation currently returns an instance of
ViewInvocation.
public void handleRequest(java.lang.Object anInvocation)
throws java.lang.Exception
Command specified in the invocation. If a command
is not available from the invocation, a default command will be used
to handle the request (an instance of DefaultRequestHandlingCommand
).There is no need to override this method in implementing classes, though of course, there is no reason one could not. Such a technique may be well suited to single-location security handling, logging, or other tasks.
The expected behavior of the handling method (or this method, if totally
overridden) is to forward the request to another JSP/view bean/resource,
preparing the target in any way necessary to support the request. Note
that the current request context has already been set when this method is
called by virtue of the RequestParticipant interface, which
this class implements.
handleRequest in interface RequestHandlerinvocation - The opaque invocation object previously returned by the
acceptRequest(...) method. The implementation can store
any information useful to it in this object. This implementation
currently expects this object to be an instance of
ViewInvocation.Command,
DefaultRequestHandlingCommand,
DefaultTiledRequestHandlingCommand
public void beginDisplay(DisplayEvent event)
throws ModelControlException
beginDisplay in class ContainerViewBaseevent - The DisplayEvent.ModelControlException - Thrown if manipulation of a model fails during display
preparation or execution of auto-retrieving models
public boolean beforeModelExecutes(Model model,
int executionContext)
model - The model that is about to be auto-executedexecutionContext - The context under which this model is being executed, one of
WebActionHandler.RETRIEVE_CONTEXT,
WebActionHandler.UPDATE_CONTEXT,
WebActionHandler.DELETE_CONTEXT,
WebActionHandler.INSERT_CONTEXT, or
WebActionHandler.EXECUTE_CONTEXTWebActionHandler
public void afterModelExecutes(Model model,
int executionContext)
model - The model that has been auto-executedexecutionContext - The context under which this model is being executed, one of
WebActionHandler.RETRIEVE_CONTEXT,
WebActionHandler.UPDATE_CONTEXT,
WebActionHandler.DELETE_CONTEXT,
WebActionHandler.INSERT_CONTEXT, or
WebActionHandler.EXECUTE_CONTEXTWebActionHandlerpublic void afterAllModelsExecute(int executionContext)
executionContext - The context under which the models have been executed, one of
WebActionHandler.RETRIEVE_CONTEXT,
WebActionHandler.UPDATE_CONTEXT,
WebActionHandler.DELETE_CONTEXT,
WebActionHandler.INSERT_CONTEXT, or
WebActionHandler.EXECUTE_CONTEXTWebActionHandler
public final void onNoModelDataAvailable(Model model,
int executionContext)
first method after being executed. The developer may, for
exmaple, use this method to display alternate information, display a
message that no data was available, or hide portions of the page.This method is only called during web action handling. The reason this and similar methods exist is to provide the developer a chance to perform application logic upon auto-execution, where they have no other opportunity to do so because the invocation of auto-executing models is under the control of the framework.
model - The model that indicated it contained no dataexecutionContext - The context under which this model is being executed, one of
WebActionHandler.RETRIEVE_CONTEXT,
WebActionHandler.UPDATE_CONTEXT,
WebActionHandler.DELETE_CONTEXT,
WebActionHandler.INSERT_CONTEXT, or
WebActionHandler.EXECUTE_CONTEXTWebActionHandler
public void onModelError(Model model,
int executionContext,
ModelControlException exception)
throws ModelControlException
ModelControlException during auto-execution. The default
implementation of this method is to rethrow the exception. This method
is only called during web action handling. The reason this and similar
methods exist is to provide the developer a chance to perform application
logic upon auto-execution, where they have no other opportunity to do so
because the invocation of auto-executing models is under the control of
the framework.model - The model that threw the provided exceptionexecutionContext - The context under which this model is being executed, one of
WebActionHandler.RETRIEVE_CONTEXT,
WebActionHandler.UPDATE_CONTEXT,
WebActionHandler.DELETE_CONTEXT,
WebActionHandler.INSERT_CONTEXT, or
WebActionHandler.EXECUTE_CONTEXTexception - The exception thrown during auto-executionWebActionHandlerpublic Model[] getWebActionModels(int executionType)
getWebActionModels in interface WebActionHandlerexecutionType - The web action model type, one of MODEL_TYPE_RETRIEVE,
MODEL_TYPE_UPDATE, MODEL_TYPE_DELETE,
MODEL_TYPE_INSERT, or MODEL_TYPE_EXECUTEpublic boolean isAutoRetrieveEnabled()
isAutoRetrieveEnabled in interface WebActionHandlerpublic void setAutoRetrieveEnabled(boolean autoRetrieveEnabled)
setAutoRetrieveEnabled in interface WebActionHandlerautoRetrieveEnabled - Turns on or off auto-retrieval on the next display. Set to
false to supress execution of auto-retrieving/executing models.protected java.lang.String getWebActionRowOffsetSessionKey()
protected int getWebActionModelOffset()
protected void setWebActionModelOffset(int value)
protected DatasetModelExecutionContext createDefaultExecutionContext()
protected DatasetModelExecutionContext getAutoRetrieveExecutionContext()
beginDisplay() method.protected void setAutoRetrieveExecutionContext(DatasetModelExecutionContext value)
beginDisplay() method. A context is generally set by the web
action handling logic to provide appropriate values when the page
is redisplayed.value - The auto-retrieving execution context or null to clear the
current contextpublic DatasetModelExecutionContext getRefreshActionExecutionContext()
public DatasetModelExecutionContext getFirstActionExecutionContext()
public DatasetModelExecutionContext getNextActionExecutionContext()
public DatasetModelExecutionContext getPreviousActionExecutionContext()
public DatasetModelExecutionContext getLastActionExecutionContext()
public void handleWebAction(int actionType)
throws java.io.IOException,
javax.servlet.ServletException
handleWebAction in interface WebActionHandleractionType - The web action type to performWebActionHandler
public void executeAutoRetrievingModels()
throws ModelControlException
context - The execution context used to execute the target models
public void executeAutoRetrievingModels(DatasetModelExecutionContext context)
throws ModelControlException
context - The execution context used to execute the target models
public void executeAutoUpdatingModels(ModelExecutionContext context)
throws ModelControlException
context - The execution context used to execute the target models
public void executeAutoInsertingModels(ModelExecutionContext context)
throws ModelControlException
context - The execution context used to execute the target models
public void executeAutoDeletingModels(ModelExecutionContext context)
throws ModelControlException
context - The execution context used to execute the target models
public void executeAutoExecutingModels(ModelExecutionContext context)
throws ModelControlException
context - The execution context used to execute the target models
public java.lang.Object executeAutoRetrievingModel(DatasetModelExecutionContext context,
Model m)
throws ModelControlException
context - The execution context used to execute the target modelsm - The model to execute
public java.lang.Object executeAutoUpdatingModel(ModelExecutionContext context,
Model m)
throws ModelControlException
context - The execution context used to execute the target modelsm - The model to execute
public java.lang.Object executeAutoInsertingModel(ModelExecutionContext context,
Model m)
throws ModelControlException
context - The execution context used to execute the target modelsm - The model to execute
public java.lang.Object executeAutoDeletingModel(ModelExecutionContext context,
Model m)
throws ModelControlException
context - The execution context used to execute the target modelsm - The model to execute
public java.lang.Object executeAutoExecutingModel(ModelExecutionContext context,
Model m)
throws ModelControlException
context - The execution context used to execute the target modelsm - The model to executepublic Model getModel(java.lang.Class clazz)
ModelManager easier. It is a replacement for the
following:
getRequestContext().getModelManager().getModel(modelClass)
public ViewBean getViewBean(java.lang.Class clazz)
ViewBeanManager easier. It is a replacement for the following:
getRequestContext().getViewBeanManager().getViewBean(viewBeanClass)
public javax.servlet.http.HttpSession getSession()
RequestContext easier. It is a replacement for the
following:
getRequestContext().getRequest().getSession(true)
public void appMessage(java.lang.String message)
RequestContext easier. It is a replacement for the
following:
getRequestContext().getMessageWriter().println(message);
appMessage in class ContainerViewBasecom.iplanet.jato.view.ContainerViewBasemessage - The message to be added to the application message buffer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||