com.iplanet.jato.view
Class ViewBeanBase

java.lang.Object
  |
  +--com.iplanet.jato.view.ViewBase
        |
        +--com.iplanet.jato.view.ContainerViewBase
              |
              +--com.iplanet.jato.view.RequestHandlingViewBase
                    |
                    +--com.iplanet.jato.view.ViewBeanBase
All Implemented Interfaces:
ContainerView, RequestCompletionListener, RequestHandler, RequestParticipant, View, ViewBean, WebActionHandler, WebActions

public class ViewBeanBase
extends RequestHandlingViewBase
implements ViewBean

A default implementation of ViewBean.

Version:
JATO/1.2.2 $Id: ViewBeanBase.java,v 1.43 2002/07/13 02:33:51 todd Exp $

Field Summary
static java.lang.String DEFAULT_COMMAND_CHILD_NVP_NAME
          The name of the attribute used to store the default command child in the request parameters.
static java.lang.String DISPLAY_EVENT_COMPLETED_REQUEST_ATTRIBUTE_NAME
          A flag used to indicate that a CompleteRequestException was thrown during a display event.
static boolean OPTION_USE_PAGE_SESSION_FOR_DEFAULT_COMMAND_CHILD
          Enabling is not recommended, as it is a fairly significant performance hit For example, it causes the page session to be deserialized twice in some cases, and causes the page session to be reserialized in situations in which it otherwise wouldn't.
 
Fields inherited from class com.iplanet.jato.view.RequestHandlingViewBase
HANDLE_REQUEST_METHOD_PREFIX, 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.ViewBean
PAGE_SESSION_ATTRIBUTE_NVP_NAME, VIEW_BEAN_NAME_SUFFIX
 
Fields inherited from interface com.iplanet.jato.view.View
QUALIFIED_VIEW_NAME_SEPARATOR
 
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
 
Constructor Summary
  ViewBeanBase(java.lang.String name)
          Creates a ViewBeanBase object
protected ViewBeanBase(View parent, java.lang.String name)
          Inappropriate for ViewBeans since they have no parent.
 
Method Summary
 void clearPageSessionAttributes()
          This method clears all page-scoped "session" attributes from this view bean's internal list.
protected  View createChild(java.lang.String s)
          Called to instantiate the named child.
protected  void deserializePageAttributes()
          Deserializes the page session attributes.
 void forward(java.lang.String target, ViewBean targetViewBean, RequestContext requestContext)
          Forward the request to the specified view bean and target resource.
protected  void forwardTo()
          Forwards the request to this view bean, redisplaying the page.
 void forwardTo(RequestContext requestContext)
          Forwards the request to this view bean, displaying the page.
 CommandDescriptor getDefaultCommandDescriptor()
          Returns the default command descriptor that can be used to handle requests that are otherwise unhandled by this view or any of its children.
 java.lang.String getDefaultDisplayURL()
          Returns the default URL that will be used to display this view bean.
 java.lang.String getDisplayURL()
          Returns the URL that will be used to display this view bean.
 java.lang.String getModuleURL()
          Returns this ViewBean's module URL.
 java.lang.Object getPageSessionAttribute(java.lang.String name)
          This method gets the value of a page-scoped "session" attribute.
protected  java.util.Map getPageSessionAttributes()
          Returns a Map of the page session attributes.
 java.lang.String getPageSessionAttributeString()
          Returns the serialized page session attributes as a URL encoded string.
 java.lang.String getPageSessionAttributeString(boolean isEmbedded)
          Returns the serialized page session attributes as a URL encoded string.
 java.lang.String getRequestInvocationName()
          Returns a logical string that is used by the application servlet to dispatch a request to a particular target view bean.
static java.lang.String getRequestInvocationName(ViewBean bean)
          Returns a logical string that is used by the application servlet to dispatch a request to a particular target view bean.
protected  void include()
          Includes this view bean in the current response.
 void include(RequestContext requestContext)
          Forwards the request to this view bean, displaying the page.
 void include(java.lang.String target, ViewBean targetViewBean, RequestContext requestContext)
          Include in the response output the target resource, using the specified view bean.
 boolean invokeRequestHandler()
          Invokes the request handling mechanism that corresponds to the current request.
protected  boolean invokeRequestHandlerInternal(RequestHandler handler, RequestContext requestContext)
          Invokes the request handling mechanism on the child that corresponds to the generated request.
 void mapRequestParameters(javax.servlet.http.HttpServletRequest request)
          Maps servlet request parameter values into subviews.
 java.lang.Object removePageSessionAttribute(java.lang.String name)
          This method removes a page-scoped "session" attribute from this view bean's ' * internal list of attributes.
 void resetChildren()
          Resets all children to a default state in a container-defined way.
 void securityCheck()
          This method is the first method called during the display processing of the JSP, and should be used to enforce any security necessary to the display of this page.
 void setDefaultCommandDescriptor(CommandDescriptor value)
          Sets the default command descriptor that can be used to handle requests that are otherwise unhandled by this view or any of its children.
 void setDefaultDisplayURL(java.lang.String value)
          Sets the default URL that will be used to display this view bean.
 void setPageSessionAttribute(java.lang.String name, java.io.Serializable value)
          This method sets the value of a page-scoped "session" attribute.
protected  void setPageSessionAttributes(java.util.Map value)
          Set the Map of the page session attributes.
 void setRequestContext(RequestContext context)
          Sets the request context
 
Methods inherited from class com.iplanet.jato.view.RequestHandlingViewBase
acceptRequest, afterAllModelsExecute, afterModelExecutes, appMessage, beforeModelExecutes, beginDisplay, createDefaultExecutionContext, executeAutoDeletingModel, executeAutoDeletingModels, executeAutoExecutingModel, executeAutoExecutingModels, executeAutoInsertingModel, executeAutoInsertingModels, executeAutoRetrievingModel, executeAutoRetrievingModels, executeAutoRetrievingModels, executeAutoUpdatingModel, executeAutoUpdatingModels, getAutoRetrieveExecutionContext, getFirstActionExecutionContext, getLastActionExecutionContext, getModel, getNextActionExecutionContext, getPreviousActionExecutionContext, getRefreshActionExecutionContext, getRequestCompletionListenerChildNames, getRequestContext, getRequestParticipantChildNames, getSession, getViewBean, getWebActionModelOffset, getWebActionModels, getWebActionRowOffsetSessionKey, handleRequest, handleWebAction, isAutoRetrieveEnabled, onModelError, onNoModelDataAvailable, requestComplete, setAutoRetrieveEnabled, setAutoRetrieveExecutionContext, setWebActionModelOffset
 
Methods inherited from class com.iplanet.jato.view.ContainerViewBase
beginChildDisplay, beginChildDisplay, beginDisplay, childExists, createChildInternal, endChildDisplay, endChildDisplay, endDisplay, endDisplay, ensureChild, getChild, getChildNames, getChildNames, getChildType, getCommandChildNames, getDefaultModel, getDisplayField, getDisplayFieldBooleanValue, getDisplayFieldDoubleValue, getDisplayFieldIntValue, getDisplayFieldStringValue, getDisplayFieldValue, getNumChildren, getQualifiedCommandChildNames, mapRequestParameter, onValidationException, registerChild, registerDisplayEventHandlers, removeAllChildren, removeChild, removeQualifiedNameIndices, setDefaultModel, setDisplayFieldValue, setDisplayFieldValue, setDisplayFieldValue, setDisplayFieldValue, unregisterChild
 
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.ViewBean
getModel, getSession, getViewBean
 
Methods inherited from interface com.iplanet.jato.view.ContainerView
beginChildDisplay, beginDisplay, endChildDisplay, endDisplay, getChild, getChildNames, getChildType, getDefaultModel, getDisplayField, getDisplayFieldValue, getNumChildren, setDisplayFieldValue
 
Methods inherited from interface com.iplanet.jato.view.View
getName, getParent, getQualifiedName, setParent
 
Methods inherited from interface com.iplanet.jato.RequestHandler
acceptRequest, getRequestContext, handleRequest
 
Methods inherited from interface com.iplanet.jato.view.WebActionHandler
getWebActionModels, handleWebAction, isAutoRetrieveEnabled, setAutoRetrieveEnabled
 

Field Detail

DISPLAY_EVENT_COMPLETED_REQUEST_ATTRIBUTE_NAME

public static java.lang.String DISPLAY_EVENT_COMPLETED_REQUEST_ATTRIBUTE_NAME
A flag used to indicate that a CompleteRequestException was thrown during a display event. This attribute is used solely for the "CompleteRequestException tunneling" workaround that allows developers to throw CompleteRequestExceptions from their display events without the JSP subsystem catching and consuming them.

DEFAULT_COMMAND_CHILD_NVP_NAME

public static final java.lang.String DEFAULT_COMMAND_CHILD_NVP_NAME
The name of the attribute used to store the default command child in the request parameters. This parameter will be used when a default request is invoked on a page, meaning that an activated command child is otherwise unspecified.
Since:
JATO/1.2

OPTION_USE_PAGE_SESSION_FOR_DEFAULT_COMMAND_CHILD

public static final boolean OPTION_USE_PAGE_SESSION_FOR_DEFAULT_COMMAND_CHILD
Enabling is not recommended, as it is a fairly significant performance hit For example, it causes the page session to be deserialized twice in some cases, and causes the page session to be reserialized in situations in which it otherwise wouldn't.
Constructor Detail

ViewBeanBase

public ViewBeanBase(java.lang.String name)
Creates a ViewBeanBase object
Parameters:
name - The logical name of this view.

ViewBeanBase

protected ViewBeanBase(View parent,
                       java.lang.String name)
Inappropriate for ViewBeans since they have no parent.
Method Detail

createChild

protected View createChild(java.lang.String s)
Description copied from class: ContainerViewBase
Called to instantiate the named child. This method will typically be called only when access to a child is required, for example, as the result of a getChild(...) method call.
Overrides:
createChild in class ContainerViewBase
Following copied from class: com.iplanet.jato.view.ContainerViewBase
Parameters:
name - The name of the child to instantiate. This method may throw an IllegalArgumentException to indicate an improper child name.
Returns:
The named child view or null if this name does not correspond to a child associated with this container.

resetChildren

public void resetChildren()
Description copied from interface: ContainerView
Resets all children to a default state in a container-defined way. For example, if the contained children are instances of DisplayField , these children may be set to contain default values.
Specified by:
resetChildren in interface ContainerView
Overrides:
resetChildren in class ContainerViewBase

securityCheck

public void securityCheck()
                   throws SecurityCheckException
This method is the first method called during the display processing of the JSP, and should be used to enforce any security necessary to the display of this page. The default implementation only checks to see if request context is present. This is in order to prevent users from accessing the page directly as a JSP. Developers should rework this method to comply with their own security strategy. Developers can either rework this method here or in a subclass.
Specified by:
securityCheck in interface ViewBean

setRequestContext

public void setRequestContext(RequestContext context)
Description copied from interface: RequestParticipant
Sets the request context
Specified by:
setRequestContext in interface RequestParticipant
Overrides:
setRequestContext in class RequestHandlingViewBase
Following copied from interface: com.iplanet.jato.RequestParticipant
Parameters:
requestContext - The request context of the current request

getDisplayURL

public java.lang.String getDisplayURL()
Description copied from interface: ViewBean
Returns the URL that will be used to display this view bean. This method is used internally to obtain the display URL immediately before display begins; therefore, developers can override this method to perform alternative URL lookups. The default implementation of this method should return the default URL specified by the getDefaultDisplayURL() method.
Specified by:
getDisplayURL in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Returns:
The display URL, relative to the context root. This URL does NOT have to refer to a JSP, but normally should.

getDefaultDisplayURL

public java.lang.String getDefaultDisplayURL()
Returns the default URL that will be used to display this view bean. This URL need not be the only URL that uses this view bean, but this URL will be the default preference.
Specified by:
getDefaultDisplayURL in interface ViewBean
Returns:
The default display URL, relative to the context root. This URL does NOT have to refer to a JSP, but normally should.

setDefaultDisplayURL

public void setDefaultDisplayURL(java.lang.String value)
Sets the default URL that will be used to display this view bean. This URL need not be the only URL that uses this view bean, but this URL will be the default preference.
Specified by:
setDefaultDisplayURL in interface ViewBean
Parameters:
value - The default display URL, relative to the context root. This URL does NOT have to refer to a JSP, but normally should.

getRequestInvocationName

public final java.lang.String getRequestInvocationName()
Description copied from interface: ViewBean
Returns a logical string that is used by the application servlet to dispatch a request to a particular target view bean. This value is automatically encoded in the rendered JSP to route request back to the generated view bean. Developers need not concern themselves with the implementation of this method in the current implementation.
Specified by:
getRequestInvocationName in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Returns:
The invocation name used to locate this view bean

getModuleURL

public final java.lang.String getModuleURL()
Description copied from interface: ViewBean
Returns this ViewBean's module URL. This URL is normally used in the JSP form tag's action attribute and to generate HREFs in the JSP.
Specified by:
getModuleURL in interface ViewBean

getDefaultCommandDescriptor

public CommandDescriptor getDefaultCommandDescriptor()
Returns the default command descriptor that can be used to handle requests that are otherwise unhandled by this view or any of its children.
Returns:
The default command descriptor or null if no default command will be invoked
Since:
JATO/1.2

setDefaultCommandDescriptor

public void setDefaultCommandDescriptor(CommandDescriptor value)
Sets the default command descriptor that can be used to handle requests that are otherwise unhandled by this view or any of its children.
Parameters:
value - The default command descriptor or null if no default command should be invoked
Since:
JATO/1.2

forwardTo

protected void forwardTo()
                  throws NavigationException
Forwards the request to this view bean, redisplaying the page. This method is the equivalent of RequestDispatcher.forward(), meaning that the same semantics apply to the use of this method. This method makes implicit use of the display URL returned by the getDisplayURL() method.

forwardTo

public void forwardTo(RequestContext requestContext)
               throws NavigationException
Forwards the request to this view bean, displaying the page. This method is the equivalent of RequestDispatcher.forward(), meaning that the same semantics apply to the use of this method. This method makes implicit use of the display URL returned by the getDisplayURL() method.
Specified by:
forwardTo in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
requestContext - The current request context object
Throws:
NavigationException - Thrown by the servlet container if there is an error forwarding to the view bean's default URL. This exception will only be thrown if the container throws an IOException or ServletException, and that exception will be available through the NavigationException's getRootCause() method.

include

protected void include()
                throws NavigationException
Includes this view bean in the current response. This method is the equivalent of RequestDispatcher.include(), meaning that the same semantics apply to the use of this method. This method makes implicit use of the display URL returned by the getDisplayURL() method.
Since:
JATO/1.2

include

public void include(RequestContext requestContext)
             throws NavigationException
Forwards the request to this view bean, displaying the page. This method is the equivalent of RequestDispatcher.forward(), meaning that the same semantics apply to the use of this method. This method makes implicit use of the display URL returned by the getDisplayURL() method.
Since:
JATO/1.2

forward

public void forward(java.lang.String target,
                    ViewBean targetViewBean,
                    RequestContext requestContext)
             throws NavigationException
Description copied from interface: ViewBean
Forward the request to the specified view bean and target resource. This method uses the specified resource URL to render the specified view bean. Note that this method does not ensure that the target resource and the view bean are compatible. In terms of the interaction with the servlet container, this method is equivalent to a call to RequestDispatcher.forward(...). Therefore, any actions taken after this method is called are subject to the actions allowed by the servlet container.
Specified by:
forward in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
target - The target resource (normally a JSP) used to render the specified view ban
targetViewBean - The view bean to be rendered by the target resource. This instance is placed in the request attributes so that is is automatically available to the target JSP via a useBean directive. The name of the request attribute containing the target view bean is specified by the ViewBean.REQUEST_ATTRIBUTE_NAME constant.
requestContext - The current request context object
Throws:
NavigationException - Thrown by the servlet container if there is an error forwarding to the URL resource. This exception will only be thrown if the container throws an IOException or ServletException, and that exception will be available through the NavigationException .getRootCause() method.

include

public void include(java.lang.String target,
                    ViewBean targetViewBean,
                    RequestContext requestContext)
             throws NavigationException
Description copied from interface: ViewBean
Include in the response output the target resource, using the specified view bean. Note that this method does not ensure that the target resource and the view bean are compatible.

In terms of the interaction with the servlet container, this method is equivalent to a call to RequestDispatcher.include(...). Therefore, any actions taken after this method is called are subject to the actions allowed by the servlet container.

Specified by:
include in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
target - The target resource (normally a JSP) used to render the specified view ban
targetViewBean - The view bean to be rendered by the target resource. This instance is placed in the request attributes so that is is automatically available to the target JSP via a useBean directive. The name of the request attribute containing the target view bean is specified by the ViewBean.REQUEST_ATTRIBUTE_NAME constant.
requestContext - The current request context object
Throws:
NavigationException - Thrown by the servlet container if there is an error including to the view bean's default URL. This exception will only be thrown if the container throws an IOException or ServletException, and that exception will be available through the NavigationException's getRootCause() method.

invokeRequestHandler

public boolean invokeRequestHandler()
                             throws java.lang.Exception
Description copied from interface: ViewBean
Invokes the request handling mechanism that corresponds to the current request. The view bean may implement this behavior in any way it sees fit, and the request handling behavior may vary with implementation. For example, the default implementation invokes the handleRequest method on the request-handling view that corresponds to the request. Such a view may be the view bean itself or one of its children.
Specified by:
invokeRequestHandler in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Throws:
java.io.IOException - Thrown if an exception occurs writing to the response output stream during handling of the request
javax.servlet.ServletException - Thrown if any other exception occurs during handling of the request

invokeRequestHandlerInternal

protected boolean invokeRequestHandlerInternal(RequestHandler handler,
                                               RequestContext requestContext)
                                        throws java.lang.Exception
Invokes the request handling mechanism on the child that corresponds to the generated request. This method searches this bean as well as all its request-handling children (children that are instances of RequestHandler) to find a child that can accept the request. This search is accomplished using the acceptRequest method in the RequestHandler interface.
Throws:
java.io.IOException - Thrown if an exception occurs writing to the response output stream during handling of the request
javax.servlet.ServletException - Thrown if any other exception occurs during handling of the request

getPageSessionAttributeString

public java.lang.String getPageSessionAttributeString(boolean isEmbedded)
Description copied from interface: ViewBean
Returns the serialized page session attributes as a URL encoded string. This method is normally used by the application servlet and HREF display fields when they encode the page session information into the displaying page. This method could also be called by developers wishing to include this information into custom (non-ViewBean-managed) hrefs or forms.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

For example, the page session attributes can be used to specify the current record being displayed on a page. If a user backtracks to a prior page using his browser's Back button and resubmits it, the application can take appropriate action that is based on the record location encoded in the page, rather than the location of the last rendered record. Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Specified by:
getPageSessionAttributeString in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
isEmbedded - If true, this method prefixes the string with a form name-value separator ("&")

getPageSessionAttributeString

public java.lang.String getPageSessionAttributeString()
Returns the serialized page session attributes as a URL encoded string. This method is normally used by the application servlet and HREF display fields when they encode the page session information into the displaying page. This method could also be called by developers wishing to include this information into custom (non-ViewBean-managed) hrefs or forms.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

For example, the page session attributes can be used to specify the current record being displayed on a page. If a user backtracks to a prior page using his browser's Back button and resubmits it, the application can take appropriate action that is based on the record location encoded in the page, rather than the location of the last rendered record. Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.


deserializePageAttributes

protected void deserializePageAttributes()
Deserializes the page session attributes.

This method is automatically called as part of the request handling logic in order to automatically repopulate the page session value Map from its serialized form.


getPageSessionAttributes

protected java.util.Map getPageSessionAttributes()
Returns a Map of the page session attributes.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Returns:
Map of the page session attributes.

setPageSessionAttributes

protected void setPageSessionAttributes(java.util.Map value)
Set the Map of the page session attributes.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Parameters:
value - The Map of the page session attributes.

getPageSessionAttribute

public java.lang.Object getPageSessionAttribute(java.lang.String name)
Description copied from interface: ViewBean
This method gets the value of a page-scoped "session" attribute. Page session attributes are encoded into a rendered page automatically and are repopulated when a page is resubmitted.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Note that the use of the term "session" here is for analogy only. Page session objects are never actually stored in the HttpSession.

For example, the page session attributes can be used to specify the current record being displayed on a page. If a user backtracks to a prior page using his browser's Back button and resubmits it, the application can take appropriate action that is based on the record location encoded in the page, rather than the location of the last rendered record.

Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Specified by:
getPageSessionAttribute in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
name - The name of the page session attribute to retrieve
Returns:
The specified page session attribute, or null if the named attribute doesn't exist.

setPageSessionAttribute

public void setPageSessionAttribute(java.lang.String name,
                                    java.io.Serializable value)
Description copied from interface: ViewBean
This method sets the value of a page-scoped "session" attribute. Page session attributes are serialized into a rendered page automatically and are repopulated when a page is resubmitted. Page session attribute values are only available to the view bean instance that handles the incoming request of the previously displayed page.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

For example, the page session attributes can be used to specify the current record being displayed on a page. If a user backtracks to a prior page using his browser's Back button and resubmits it, the application can take appropriate action that is based on the record location encoded in the page, rather than the location of the last rendered record. Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Specified by:
setPageSessionAttribute in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
name - The name of the page session attribute to set
value - The page session attribute value. If this value is null, the page session attribute is removed from the list of attributes and will not be encoded into the next display of this view bean.

removePageSessionAttribute

public java.lang.Object removePageSessionAttribute(java.lang.String name)
Description copied from interface: ViewBean
This method removes a page-scoped "session" attribute from this view bean's ' * internal list of attributes. The specified attribute will not be encoded into the next display of this view bean.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

For example, the page session attributes can be used to specify the current record being displayed on a page. If a user backtracks to a prior page using his browser's Back button and resubmits it, the application can take appropriate action that is based on the record location encoded in the page, rather than the location of the last rendered record. Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Specified by:
removePageSessionAttribute in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
name - The name of the page session attribute to remove
return - The page session attribute that was removed, or null if that attribute did not exist.

clearPageSessionAttributes

public void clearPageSessionAttributes()
Description copied from interface: ViewBean
This method clears all page-scoped "session" attributes from this view bean's internal list. No attributes will be encoded into the next display of this view bean.

The page session API is intended to mirror the standard user session API, but maintain values that are related only to a given page and request. This means that the page session can be used to specify context information that is not subject to confusion if the user presses his browser's Back button or otherwise follows a different path through the application that is different than the server's placement of the user within the application. Page session objects are never actually stored in the HttpSession.

For example, the page session attributes can be used to specify the current record being displayed on a page. If a user backtracks to a prior page using his browser's Back button and resubmits it, the application can take appropriate action that is based on the record location encoded in the page, rather than the location of the last rendered record. Page session attributes are automatically repopulated from their serialized form in the page when a page is resubmitted. Page session attributes are not automatically cleared when a page is displayed. Thus, they will automatically persist if a page is submitted and then redisplayed.

Specified by:
clearPageSessionAttributes in interface ViewBean
Following copied from interface: com.iplanet.jato.view.ViewBean
Parameters:
name - The name of the page session attribute to remove
return - The page session attribute that was removed, or null if that attribute did not exist.

mapRequestParameters

public void mapRequestParameters(javax.servlet.http.HttpServletRequest request)
                          throws ModelControlException
Description copied from interface: ContainerView
Maps servlet request parameter values into subviews. Normally, this method is used to push values from the request into contained value-based views (DisplayFields) or models. This method typically delegates parameter mapping of child container views to those views by calling this method recursively on those children.

This method is called at the beginning of a servlet request in order to initialize this container and its children with values appropriate to the current request.

This method is currently required in this interface to support the intervention needed by the container to prepare its subviews. For example, subviews may have not know that they are contained by another view, and unbeknownst to it, that view's values may be represented in a way that is container dependent. Thus, the container must be able to intervene in the mapping of values to contained views.

Specified by:
mapRequestParameters in interface ContainerView
Overrides:
mapRequestParameters in class ContainerViewBase
Following copied from interface: com.iplanet.jato.view.ContainerView
Parameters:
request - The request object of the current servlet request
Throws:
ModelControlException - Thrown if manipulation of a model fails during mapping

getRequestInvocationName

public static java.lang.String getRequestInvocationName(ViewBean bean)
Returns a logical string that is used by the application servlet to dispatch a request to a particular target view bean. This value is automatically encoded in the rendered JSP to route request back to the generated view bean. Developers need not concern themselves with the implementation of this method in the current implementation.
Parameters:
bean - The ViewBean in question.
Returns:
The invocation name used to locate the view bean