org.makumba.list.pagination
Class PaginationTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableElement
org.makumba.analyser.AnalysableTag
org.makumba.commons.tags.GenericMakumbaTag
org.makumba.list.pagination.PaginationTag
- All Implemented Interfaces:
- Serializable, IterationTag, JspTag, Tag
public class PaginationTag
- extends GenericMakumbaTag
This class provides pagination navigation links, i.e. links to the first, previous, next and last page of a paginated
list. This tag can be used in the following three ways:
- Inside a mak:list: no attribute needs to be specified
- Outside a mak:list: specify the list using the 'forList' attribute
- Not connected to a specific mak:list: specify limit, offset and totalCount attributes
- Version:
- $Id: PaginationTag.java,v 1.1 23.12.2007 21:41:04 Rudi Exp $
- Author:
- Rudolf Mayer
- See Also:
- Serialized Form
Methods inherited from class org.makumba.commons.tags.GenericMakumbaTag |
doStartTag, getParams, isAttribute, setAddTitle, setCols, setDefault, setElementSeparator, setEllipsis, setEllipsisLength, setEmpty, setFormat, setHtml, setLabelSeparator, setLineSeparator, setLongLineLength, setMaxlength, setMaxLength, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRows, setSize, setStyle, setStyleId, setTitle, setType, setType, setUrlEncode, toString |
Methods inherited from class org.makumba.analyser.AnalysableTag |
addTagText, allowsIdenticalKey, canHaveBody, checkAttributeValues, doEndAnalyze, doEndTag, getElementData, getPageContext, getPageTextInfo, getTagKey, getTagText, needPageCache, notEmpty, onlyInt, registerAttributeValues, setTagDataAtAnalysis |
Methods inherited from class org.makumba.analyser.AnalysableElement |
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
PaginationTag
public PaginationTag()
doAnalyzedEndTag
public int doAnalyzedEndTag(PageCache pageCache)
throws LogicException,
JspException
- Description copied from class:
AnalysableTag
- makumba-specific endTag
- Overrides:
doAnalyzedEndTag
in class AnalysableTag
- Parameters:
pageCache
- The page cache for the current page
- Throws:
LogicException
JspException
- See Also:
AnalysableTag.doEndTag()
doStartAnalyze
public void doStartAnalyze(PageCache pageCache)
- Description copied from class:
AnalysableTag
- Starts the analysis of the tag, without knowing what tags follow it in the page. Typically this method will
allocate initial data structures, that are then completed at doEndAnalyze()
- Overrides:
doStartAnalyze
in class AnalysableTag
- Parameters:
pageCache
- The page cache for the current page
doAnalyzedStartTag
public int doAnalyzedStartTag(PageCache pageCache)
throws LogicException,
JspException
- Description copied from class:
AnalysableTag
- makumba-specific startTag.
- Overrides:
doAnalyzedStartTag
in class AnalysableTag
- Parameters:
pageCache
- The page cache for the current page
- Throws:
LogicException
JspException
- See Also:
AnalysableTag.doStartTag()
getQueryString
public StringBuilder getQueryString(Map<?,?> map)
setForList
public void setForList(String forList)
setItemName
public void setItemName(String itemName)
setLimit
public void setLimit(String limit)
throws JspException
- Throws:
JspException
setOffset
public void setOffset(String offset)
throws JspException
- Throws:
JspException
setStyleClass
public void setStyleClass(String styleClass)
- Overrides:
setStyleClass
in class GenericMakumbaTag
setShowPageTitle
public void setShowPageTitle(String showPageTitle)
setPaginationLinkTitle
public void setPaginationLinkTitle(String paginationLinkTitle)
setPaginationLinkTitleText
public void setPaginationLinkTitleText(String paginationLinkTitleText)
setTotalCount
public void setTotalCount(String totalCount)
throws JspException
- Throws:
JspException
setAction
public void setAction(String action)
setTagKey
public void setTagKey(PageCache pageCache)
- Description copied from class:
AnalysableTag
- Sets tagKey to uniquely identify this tag. Called at analysis time before doStartAnalyze() and at runtime before
doMakumbaStartTag()
- Overrides:
setTagKey
in class AnalysableTag
- Parameters:
pageCache
- The page cache for the current page- See Also:
AnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache)
,
AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)
initialiseState
public void initialiseState()
- Description copied from class:
GenericMakumbaTag
- Resets and initialises the tag's state, to work in a tag pool. See bug 583. If this method is overriden in a
child class, the child's method must call super.initaliseState().
- Overrides:
initialiseState
in class GenericMakumbaTag
registerPossibleAttributeValues
protected void registerPossibleAttributeValues()
- Description copied from class:
AnalysableTag
- Override this in order to register possible attribute values using
AnalysableTag.registerAttributeValues(String, String...)
. The registered attributes are checked before
AnalysableTag.doStartAnalyze(PageCache)
and throw a ProgrammerError
is thrown if the provided value is not
allowed.
- Overrides:
registerPossibleAttributeValues
in class AnalysableTag
doAnalyzedCleanup
protected void doAnalyzedCleanup()
- Description copied from class:
AnalysableTag
- Called by doEndTag in its finally block. Use it to clean references that will not be used next time the servlet
container uses the tag object.
- Overrides:
doAnalyzedCleanup
in class GenericMakumbaTag