public abstract class MainPagingServlet extends MainServlet implements PagingServlet
MainServlet
that provides default
functionality for paged main page servlet processing and defines method
signatures for specific servlet requirements.
For use by servlets that allow for paging through a list of records.
Modifier and Type | Class and Description |
---|---|
protected class |
MainPagingServlet.Context
Inner class used to store servlet context information.
|
FlashServlet.Stack
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
DISPLAY_MODE, SN_ADMINMODE, SN_CATEGORIES, SN_CATEGORIES_LISTONLY, SN_CATEGORIES_PATH, SN_CATEGORY, SN_CONTINUE_PAGEURL, SN_PRODUCTS, SN_PRODUCTS_INSTOCK, SN_PRODUCTS_NOSTOCK, SN_PRODUCTS_PAFILTERS, SN_PRODUCTS_PAGEHIST, SN_PRODUCTS_PAGENUM, SN_PRODUCTS_PAGEURL, SOURCE_CATALOG, SOURCE_FAVORITES, SOURCE_SEARCH, SOURCE_SHOPCART, SOURCE_SPECIAL
SN_CART, SN_LOGON_STATUS, SN_SECPROFILE, SN_USER, SN_USERSFI
BROWSER_IE, BROWSER_NN, BROWSER_XX, RESP_NULL, RESP_REDIRECTED, RQST_AJAX, RQST_NULL
Constructor and Description |
---|
MainPagingServlet() |
Modifier and Type | Method and Description |
---|---|
protected MainServlet.Context |
createContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates the servlet context inner class.
|
int |
setTemplatePagingBegIndex(PagingServletContext pgCtx)
Invoked by a subclass' implementation of
setTemplateData to set
the paging beginning index data required by the html template. |
int |
setTemplatePagingEndIndex(PagingServletContext pgCtx)
Invoked by a subclass' implementation of
setTemplateData to set
the paging ending index data required by the html template. |
void |
setTemplatePagingLinks(PagingServletContext pgCtx,
int listSize)
Invoked by a subclass' implementation of
setTemplateData to set
the paging links data required by the html template. |
confirmSession, getPreviousCategoryList, getPreviousCategoryPath, hasSubcategories, hasSubcategories, isOmitNoStock, isPreshopRequest, isUserHelpRequest, setTemplateCategoryPath, sortCategoryProductData, writePageImpl
confirmCart, confirmRequest, confirmRetail, confirmWholesale, createNewCart, createNewSessionImpl, getPageTitle, getServletPath, getUser, initTemplateDataImpl, isLogonRequest, requestComplete, requiresLogon, resetCart, resetCategories, resetProducts, setDefaultUser, setSessionCart, setSFIShoppingUser, useExistingSessionImpl, writeCookie
createNewSession, determineBrowser, doGet, doPost, editFormFields, getCookie, getInvokerName, getInvokerName, getInvokerParams, getInvokerParams, getInvokerPath, getInvokerPath, getInvokerURL, getNextURL, getPageParams, getRequestURL, getServletName, getServletName, getServletParams, getServletParams, getServletPath, getServletURL, getServletURL, getTemplateMessage, getTemplateMessage, getTemplateMessage, getTemplateMessage, getTemplateMessage, getTemplateName, initTemplateData, isPrintable, isServerTomcat, log, qualifyURL, readParameters, redirectURL, resetFormFields, setCookieValues, setP3PCompactPolicy, setSessionValues, setTemplateData, showSiteError, showSiteError, showSiteError, useExistingSession, writeCookie, writeTempCookie
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
private static final long serialVersionUID
public void setTemplatePagingLinks(PagingServletContext pgCtx, int listSize)
setTemplateData
to set
the paging links data required by the html template. This method assumes
that the invoking servlet has set an appropriate value for the current page
number context variable (ctx.pageNum) prior to invoking this method.
The template variables created by this method are $PageNum
and
$PageLinks
. The $PageLinks
variable is a collection of html
link objects, where each element must be output using .toHTML()
.
setTemplatePagingLinks
in interface PagingServlet
pgCtx
- (PagingServletContext) The current servlet context.listSize
- (int) The number of records in the list being
processed.public int setTemplatePagingBegIndex(PagingServletContext pgCtx)
setTemplateData
to set
the paging beginning index data required by the html template. Returns the
index of the first record that is to be displayed on the current page. This
method assumes that prior to invoking this method, the invoking servlet
has processed the setTemplatePagingLinks
method.
The template variable created by this method is $BegIndex
.
setTemplatePagingBegIndex
in interface PagingServlet
pgCtx
- (PagingServletContext) The current servlet context.public int setTemplatePagingEndIndex(PagingServletContext pgCtx)
setTemplateData
to set
the paging ending index data required by the html template. Returns the
index of the last record that is to be displayed on the current page. This
method assumes that prior to invoking this method, the invoking servlet
has processed the setTemplatePagingLinks
method.
The template variable created by this method is $EndIndex
.
setTemplatePagingEndIndex
in interface PagingServlet
pgCtx
- (PagingServletContext) The current servlet context.protected MainServlet.Context createContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
createContext
in MainServlet
.
Invoked by doPost
and doGet
methods.createContext
in class MainServlet
request
- (HttpServletRequest) The servlet's incoming request.response
- (HttpServletResponse) The servlet's outgoing response.