Declaration:
<? class HTMLShowPagination extends HTMLShowIterable ?>
Description:
This tag is used to display a pagination bar for a PaginatedIterable.
It allows you to easily format the pagination bar, display stylish header or footer,
use images for prev/next/first/last links etc.
Essentially it will generate a series of Location objects that will
point to the current action but will have a special parameter page set to point
to different page numbers. So doing, you will have just one action that can easily display
differene pages of a longer iterable.
It requires the key attribute to be present and to point to a paginated iterable object.
You can optionally specify the displaypages attribute to set the number of page links
shown on a single page. If there are more pages than this value, the entire bar will scroll,
trying to place the current page number in the center.
For every page number, the following variables are created:
{%html.showpagination.link} - the Location object for every page
{%html.showpagination.page} - the current page number
This tag also recognizes some pseudo-tags:
- separator - defines a piece of markup that will be output after each iteration if there
still are more pages
- ifnotempty - defines a piece of markup that will be output before the first iteration
- ifempty - defines a piece of markup that will be output if the iterable is empty
- firstpage - will be displayed before everything else; you can create the link to the first
page here
- prevpage - will be displayed after firstpage pseudo-tag; use it to create a link to
the previous page
- nextpage - will be displayed after the bar; you can create the link to the next
page here
- lastpage - will be displayed last; use it to create a link to the last page
- current - will be displayed for the iterable's current page; you can use this pseudotag
to specially format the 'current' page. In case you do not provide this pseudotag, the current page
link will be rendered like all other links
Inside the last foru pseudo-tags you use the {%html.showpagination.link} and
{%html.showpagination.page} variables to create the links.
Parent Classes:
SDNode
,
SDElement
,
HTMLTag
,
HTMLShowIterable
Authors:
Methods:
-
onClose()
This method will rewind the iterable for possible later reuse
-
onOpen()
Override this to take some action (possibly modify own children state and
own attributes) and
decide whether to process the body. Please note that this method
can be called multiple times on the same instance if the tag is repeated
with the body of parent tag.
|
|