org.hdpagination.web.taglib
Class AbstractPaginationControlTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.hdpagination.web.taglib.AbstractPaginationControlTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
GoToPageTag, PagesDropdownTag, PaginationLinkTag

public abstract class AbstractPaginationControlTag
extends javax.servlet.jsp.tagext.TagSupport

Abstract base class for all tags of different types of "Pagination Control" (PaginationLinkTag, PagesDropdownTag and GoToPageTag). The types of pagination control include navigation links (e.g. Previous, Next, First, Last), page links (e.g. 1 2 3 4 5 6 7 8), available pages dropdown or goto page text field.

Since:
1.0
Author:
Liangfeng Ren
See Also:
Serialized Form

Field Summary
protected  java.lang.String actionId
          Bean identifier of the corresponding PaginationAction instance declared in Spring application context.
protected  java.lang.String resendParams
          used to indicate whether the parameters of the previous http request should be sent again.
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
AbstractPaginationControlTag()
           
 
Method Summary
 int doEndTag()
          processing of the end tag
protected abstract  java.lang.String generateHTML(Page page)
          Generate HTML code of Pagination Control
 void setActionId(java.lang.String actionId)
          Bean identifier of the corresponding PaginationAction instance declared in Spring application context.
 void setResendParams(java.lang.String resendParams)
          This property is used to indicate whether the parameters of the previous http request should be sent again.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionId

protected java.lang.String actionId
Bean identifier of the corresponding PaginationAction instance declared in Spring application context. It is used to retrieve an instance of Page from HttpServletSession, which contains all pagination related information (e.g. current page no, total records).


resendParams

protected java.lang.String resendParams
used to indicate whether the parameters of the previous http request should be sent again.

Constructor Detail

AbstractPaginationControlTag

public AbstractPaginationControlTag()
Method Detail

setActionId

public void setActionId(java.lang.String actionId)
Bean identifier of the corresponding PaginationAction instance declared in Spring application context.

Parameters:
actionId -

setResendParams

public void setResendParams(java.lang.String resendParams)
This property is used to indicate whether the parameters of the previous http request should be sent again. This event is triggered when user clicks the pagination control to access the page of data. The default value is 'false'. If you want to keep all the original request parameters in subsequent pagination requests, you should set this property to 'true'.

The types of pagination control include:

1) pagination navigation links (e.g. Previous Next 1 2 3 4 5 6 7 8 First Last), rendered by <pageLinks> tag

2) available pages dropdown, rendered by <pagesDropdown> tag

3) goto page text field and submit button, rendered by <gotoPage> tag

4) sort hyperlink, rendered by <sortBy> tag

5) select sort dropdown, rendered by <selectSortBy> tag

Parameters:
resendParams -

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
processing of the end tag

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
Throws:
javax.servlet.jsp.JspException

generateHTML

protected abstract java.lang.String generateHTML(Page page)
Generate HTML code of Pagination Control

Parameters:
page - page Page instance containing pagination related information.
Returns:


Copyright © 2008 HDPagination All Rights Reserved.