JSP CUSTOM TAG LIBRARIES
Provides pagination control over the results of a db, ftsearch, or view tag. The body is evaluated once and is expected to contain a header followed by a viewloop tag (when in the context of a view) or docloop tag (in all contexts). Navigating from page to page is done using the pagefirst, pagelast, pagenext, pageprev, and pagebar tags.
Contexts
Valid in:
The following attributes are optional:
direction
ASC, DSC, Ascending, Descending
Default is Ascending.
Note This value must be specified in the name attribute of the preserve tag before the first page tag is encountered or the page number will not be preserved correctly. If multiple page tags are present on a JSP, the JSP engine tests to see if a preserve tag exists for each page tag and throws an exception if it encounters a missing one. You can use the same name in this name attribute for more than one page if you want to preserve more than one page tag using a single preserve tag.
The default name is "page."
Note This attribute overrides the page navigation tags.
Interface
You can use the following interface to determine the current state of a JSP page:
public interface PageInfo {
// Get the current page being processed.
public abstract int getPage();
// Returns the total number of pages for this collection
// (not expensive)
public abstract int getPageCount();
// Returns TRUE if the current page is the first page
public abstract boolean isFirstPage();
// Returns TRUE if the current page is the last page
public abstract boolean isLastPage();
// Returns TRUE if the current page is the only page
public abstract boolean isOnlyPage();
// Returns TRUE if the current page is blank
// (isFirstPage() should be TRUE)
public abstract boolean isEmptyPage();