Class PagedRequestFormHandler

  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by
                      extended by
All Implemented Interfaces:
DropletFormHandler, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
Direct Known Subclasses:
BrowseFormHandler, QueryFormHandler, SimilarDocsFormHandler, StructuredQueryFormHandler, TreeQueryFormHandler

public abstract class PagedRequestFormHandler
extends BaseSearchFormHandler

This is a formhandler for paged requests. Provides the number of pages available (after the first request), a property with a handler for paging (see #handleGoToPage(Integer),

Field Summary
static java.lang.String CLASS_VERSION
Fields inherited from class atg.droplet.GenericFormHandler
Fields inherited from class atg.nucleus.GenericService
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
Constructor Summary
Method Summary
protected  SearchRequest beforeSearch(SearchRequest pRequest, pSession)
          When using saveRequest (see SearchRequest.setSaveRequest(boolean)), if this is a paging request this method will replace the current request with the last one, and update it to reflect the correct page number.
 java.lang.Integer getGoToPage()
          The 1-based page that will be retrieved next, or that has already been retrieved.
 int getPagesAvailable()
          Returns the number of available pages based on the type of paging, page size, and total results.
 boolean handleGoToPage(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called when user is iterating through pages of results.
 void setGoToPage(java.lang.Integer pPageNum)
          Sets the 1-based page that will be retrieved next.
Methods inherited from class
afterSearch, createSearchSession, doRedirect, getClearFormURL, getEnvironmentTargets, getErrorURL, getLogicalPartitionNames, getRedirect, getRedirects, getRequestFile, getResultsFetcher, getSearchAssetTools, getSearchClient, getSearchContext, getSearchException, getSearchExceptions, getSearchRedirectProcessors, getSearchRequest, getSearchRequestProcessors, getSearchResponse, getSearchResponseProcessors, getSearchSession, getSuccessURL, getUserProfile, handleClearForm, handleConnect, handleErrorCondition, handleLoad, handleLoadAndSearch, handleSearch, isForceDeployedOnlyAssets, isLoggingVerboseResponseXML, isPageRequest, isRedirectEnabled, isShowDetailedResults, isShowXml, search, setClearFormURL, setErrorURL, setForceDeployedOnlyAssets, setLoggingVerboseResponseXML, setPageRequest, setRedirectEnabled, setRequestFile, setResultsFetcher, setSearchAssetTools, setSearchContext, setSearchExceptions, setSearchRedirectProcessors, setSearchRequest, setSearchRequestProcessors, setSearchResponse, setSearchResponseProcessors, setShowDetailedResults, setShowXml, setSuccessURL, setUserProfile, stringToRequest
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static java.lang.String CLASS_VERSION
Constructor Detail


public PagedRequestFormHandler()
Method Detail


protected SearchRequest beforeSearch(SearchRequest pRequest,
When using saveRequest (see SearchRequest.setSaveRequest(boolean)), if this is a paging request this method will replace the current request with the last one, and update it to reflect the correct page number. If this is not a paging request this method ensures that any previously-saved page number is cleared from the SearchSession.

beforeSearch in class BaseSearchFormHandler
pRequest - current search request
pSession - search session
the passed-in request, or the previous request with an updated page number and chain token


public int getPagesAvailable()
Returns the number of available pages based on the type of paging, page size, and total results. It will always be >= 1. If Fast paging is disabled (the default; see PagedRequest.setFastPaging(Boolean)), this is the number of pages available; if Fast paging is enabled, this is the number of pages visited so far.

number of available pages of answers based on the type of paging and page size and total results, always >= 1


public java.lang.Integer getGoToPage()
The 1-based page that will be retrieved next, or that has already been retrieved.

The 1-based page


public void setGoToPage(java.lang.Integer pPageNum)
Sets the 1-based page that will be retrieved next. This sets the page number on the session and request.

pPageNum - The 1-based page number.
See Also:
handleGoToPage(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)


public boolean handleGoToPage(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
Called when user is iterating through pages of results.

pRequest - the servlet's request
pResponse - the servlet's response
false to stop form processing
javax.servlet.ServletException - if there was an error while executing the code - if there was an error with servlet io