Calculate the pagination string, as is shown on top of the page-info and search result tables. A pagination string contains links to pages showing the first, previous, next, last and all items of the table.

Usage#

<wiki:SetPagination start="<start>" total="<total>" pagesize="20" maxlinks="9" 
                   fmtkey="<i18n-key>" 
                     href="<href>" onclick="<javascript>" />

The result of the tag is a div block with class paginaton. The result of the tag is also saved in a page variable pagination, so you can reuse the pagination string at teh bottom of you page, if you need to.

Parameters#

Mandatory parameters:

start
start item of the page to be highlighted (cursor)
total
total number of items
pagesize
total number of items to be shown per page
maxlinks
number of page links to be generated in the pagination bar
fmtkey
pagination prefix of the i18n resource key. Following resources are expected: <fmtkey>.first, <fmtkey>.next, <fmtkey>.previous, <fmtkey>.last, <fmtkey>.all, <fmtkey>.total.

Following optional attributes can be parameterised with '%s' (item count)

href
href of each page link. (optional)
onclick
onclick of each page link. (optional)

Example#

<wiki:SetPagination start="${param.start}" total="<%=list.size()%>" pagesize="20" maxlinks="9" 
                   fmtkey="info.pagination"
                     href="#" 
                  onclick="$('start').value=%s; SearchBox.runfullsearch();" />

...

${pagination}
This will generate following html:
  <div class='pagination'>Pagination: <span class='cursor'>1</span> <a title="Show items from 21 to 40" href="#" onclick="$('start').value=20; SearchBox.runfullsearch();" >2</a> <a title="Show items from 41 to 60" href="#" onclick="$('start').value=40; SearchBox.runfullsearch();" >3</a> <a title="Show items from 21 to 40" href="#" onclick="$('start').value=20; SearchBox.runfullsearch();" ><span class="next">Next</span></a> <a title="Show all items" href="#" onclick="$('start').value=-1; SearchBox.runfullsearch();" ><span class="all">all</span></a> &nbsp;(Total items: 45 )</div>
or

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 27-Oct-2007 11:09 by 84.194.120.63  
G’day (anonymous guest) My Prefs
This is the left menu footer
JSPWiki v2.8.3-svn-4