blob: 6d4cb1b2dbf5286b7a72968ad356dece6470045c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_171) on Wed Jun 20 14:25:32 CEST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PagerTool (VelocityTools 3.0-SNAPSHOT API)</title>
<meta name="date" content="2018-06-20">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PagerTool (VelocityTools 3.0-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PagerTool.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/velocity/tools/view/LinkTool.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/velocity/tools/view/ParameterTool.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/velocity/tools/view/PagerTool.html" target="_top">Frames</a></li>
<li><a href="PagerTool.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.velocity.tools.view</div>
<h2 title="Class PagerTool" class="title">Class PagerTool</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">org.apache.velocity.tools.generic.SafeConfig</a></li>
<li>
<ul class="inheritance">
<li>org.apache.velocity.tools.view.PagerTool</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/velocity/tools/view/AbstractSearchTool.html" title="class in org.apache.velocity.tools.view">AbstractSearchTool</a></dd>
</dl>
<hr>
<br>
<pre><a href="../../../../../org/apache/velocity/tools/config/DefaultKey.html" title="annotation in org.apache.velocity.tools.config">@DefaultKey</a>(<a href="../../../../../org/apache/velocity/tools/config/DefaultKey.html#value--">value</a>="pager")
<a href="../../../../../org/apache/velocity/tools/config/InvalidScope.html" title="annotation in org.apache.velocity.tools.config">@InvalidScope</a>(<a href="../../../../../org/apache/velocity/tools/config/InvalidScope.html#value--">value</a>={"application","session"})
public class <span class="typeNameLabel">PagerTool</span>
extends <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">SafeConfig</a></pre>
<div class="block"><p>View tool for doing request-based pagination of
items in an a list.
</p>
<p><b>Usage:</b><br>
To use this class, you typically push a List of items to it
by putting it in the request attributes under the value returned by
<a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getNewItemsKey--"><code>getNewItemsKey()</code></a> (default is "new.items").
You can also set the list of items to be paged in a subclass
using the setItems(List) method, or you can always set the
item list at another point (even from within the template). This
need only happen once per session if a session is available, but the
item list can be (re)set as often as you like.
</p>
<p>
Here's an example of how your subclass would be used in a template:
<pre>
#if( $pager.hasItems() )
Showing $!pager.pageDescription&lt;br&gt;
#set( $i = $pager.index )
#foreach( $item in $pager.page )
${i}. $!item &lt;br&gt;
#set( $i = $i + 1 )
#end
&lt;br&gt;
#if ( $pager.pagesAvailable &gt; 1 )
#set( $pagelink = $link.self.param("show",$!pager.itemsPerPage) )
#if( $pager.prevIndex )
&lt;a href="$pagelink.param('index',$!pager.prevIndex)"&gt;Prev&lt;/a&gt;
#end
#foreach( $index in $pager.slip )
#if( $index == $pager.index )
&lt;b&gt;$pager.pageNumber&lt;/b&gt;
#else
&lt;a href="$pagelink.param('index',$!index)"&gt;$!pager.getPageNumber($index)&lt;/a&gt;
#end
#end
#if( $pager.nextIndex )
&lt;a href="$pagelink.param('index',$!pager.nextIndex)"&gt;Next&lt;/a&gt;
#end
#end
#else
No items in list.
#end
</pre>
<p>The output of this might look like:</p>
<pre>
Showing 1-5 of 8&lt;br&gt;
1. foo&lt;br&gt;
2. bar&lt;br&gt;
3. blah&lt;br&gt;
4. woogie&lt;br&gt;
5. baz&lt;br&gt;&lt;br&gt;
&lt;b&gt;1&lt;/b&gt; &lt;a href=""&gt;2&lt;/a&gt; &lt;a href=""&gt;Next&lt;/a&gt;
</pre>
<p>Example tools.xml configuration:</p>
<pre>
&lt;tools&gt;
&lt;toolbox scope="request"&gt;
&lt;tool class="org.apache.velocity.tools.view.PagerTool"/&gt;
&lt;/toolbox&gt;
&lt;/tools&gt;
</pre></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>VelocityTools 2.0</dd>
<dt><span class="simpleTagLabel">Version:</span></dt>
<dd>$Revision: 1769774 $ $Date: 2016-11-15 11:52:36 +0100 (mar., 15 nov. 2016) $</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Nathan Bubna</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#DEFAULT_INDEX_KEY">DEFAULT_INDEX_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#DEFAULT_ITEMS_PER_PAGE">DEFAULT_ITEMS_PER_PAGE</a></span></code>
<div class="block">the default number of items shown per page</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#DEFAULT_ITEMS_PER_PAGE_KEY">DEFAULT_ITEMS_PER_PAGE_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#DEFAULT_NEW_ITEMS_KEY">DEFAULT_NEW_ITEMS_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#DEFAULT_SLIP_SIZE">DEFAULT_SLIP_SIZE</a></span></code>
<div class="block">the default max number of page indices to list</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#DEFAULT_SLIP_SIZE_KEY">DEFAULT_SLIP_SIZE_KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected javax.servlet.http.HttpSession</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#session">session</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#STORED_ITEMS_KEY">STORED_ITEMS_KEY</a></span></code>
<div class="block">the key under which items are stored in session</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.velocity.tools.generic.SafeConfig">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">SafeConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOCK_CONFIG_KEY">LOCK_CONFIG_KEY</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#log">log</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#LOGGER_NAME_KEY">LOGGER_NAME_KEY</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#SAFE_MODE_KEY">SAFE_MODE_KEY</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#USE_CLASS_LOGGER_KEY">USE_CLASS_LOGGER_KEY</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#PagerTool--">PagerTool</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getCreateSession--">getCreateSession</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getFirstIndex--">getFirstIndex</a></span>()</code>
<div class="block">Returns the index of the first item on the current page of results
(as determined by the current index, items per page, and
the number of items).</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getIndex--">getIndex</a></span>()</code>
<div class="block">Returns the current search result index.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getIndexKey--">getIndexKey</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getItems--">getItems</a></span>()</code>
<div class="block">Returns the item list.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getItemsPerPage--">getItemsPerPage</a></span>()</code>
<div class="block">Returns the set number of items to be displayed per page of items</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getItemsPerPageKey--">getItemsPerPageKey</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getLastIndex--">getLastIndex</a></span>()</code>
<div class="block">Returns the index of the last item on the current page of results
(as determined by the current index, items per page, and
the number of items).</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getNewItemsKey--">getNewItemsKey</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getNextIndex--">getNextIndex</a></span>()</code>
<div class="block">Returns the index for the next page of items
(as determined by the current index, items per page, and
the number of items).</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPage--">getPage</a></span>()</code>
<div class="block">Returns the current "page" of search items.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPageDescription--">getPageDescription</a></span>()</code>
<div class="block">Returns a description of the current page.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPageNumber--">getPageNumber</a></span>()</code>
<div class="block">Returns the "page number" for the current index.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPageNumber-int-">getPageNumber</a></span>(int&nbsp;i)</code>
<div class="block">Returns the "page number" for the specified index.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPagesAvailable--">getPagesAvailable</a></span>()</code>
<div class="block">Returns the number of pages that can be made from this list
given the set number of items per page.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPrevIndex--">getPrevIndex</a></span>()</code>
<div class="block">Return the index for the previous page of items
(as determined by the current index, items per page, and
the number of items).</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--">getSlip</a></span>()</code>
<div class="block">Returns a <b>S</b>liding <b>L</b>ist of <b>I</b>ndices for <b>P</b>ages
of items.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlipSize--">getSlipSize</a></span>()</code>
<div class="block">Returns the number of result page indices <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--"><code>getSlip()</code></a>
will return per request (if available).</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlipSizeKey--">getSlipSizeKey</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getStoredItems--">getStoredItems</a></span>()</code>
<div class="block">Retrieves stored search items (if any) from the user's
session attributes.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getTotal--">getTotal</a></span>()</code>
<div class="block">Returns the total number of items available.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#hasItems--">hasItems</a></span>()</code>
<div class="block">Checks whether or not the result list is empty.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#reset--">reset</a></span>()</code>
<div class="block">Sets the item list to null, page index to zero, and
items per page to the default.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setCreateSession-boolean-">setCreateSession</a></span>(boolean&nbsp;createSession)</code>&nbsp;</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setIndex-int-">setIndex</a></span>(int&nbsp;index)</code>
<div class="block">Sets the index of the first result in the current page</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setIndexKey-java.lang.String-">setIndexKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setItems-java.util.List-">setItems</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;items)</code>
<div class="block">Sets the List to page through.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setItemsPerPage-int-">setItemsPerPage</a></span>(int&nbsp;itemsPerPage)</code>
<div class="block">Sets the number of items returned in a page of items</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setItemsPerPageKey-java.lang.String-">setItemsPerPageKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setNewItemsKey-java.lang.String-">setNewItemsKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setRequest-javax.servlet.http.HttpServletRequest-">setRequest</a></span>(javax.servlet.http.HttpServletRequest&nbsp;request)</code>
<div class="block">Initializes this tool with the specified <code>HttpServletRequest</code>.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setSlipSize-int-">setSlipSize</a></span>(int&nbsp;slipSize)</code>
<div class="block">Sets the number of result page indices for <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--"><code>getSlip()</code></a> to list.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setSlipSizeKey-java.lang.String-">setSlipSizeKey</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setStoredItems-java.util.List-">setStoredItems</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;items)</code>
<div class="block">Stores current search items in the user's session attributes
(if one currently exists) in order to do efficient result pagination.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#setup-javax.servlet.http.HttpServletRequest-">setup</a></span>(javax.servlet.http.HttpServletRequest&nbsp;request)</code>
<div class="block">Sets the index, itemsPerPage, and/or slipSize *if* they are set
in the request parameters.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.velocity.tools.generic.SafeConfig">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.velocity.tools.generic.<a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html" title="class in org.apache.velocity.tools.generic">SafeConfig</a></h3>
<code><a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-java.util.Map-">configure</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#configure-org.apache.velocity.tools.generic.ValueParser-">configure</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#getLog--">getLog</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#initLogger-org.apache.velocity.tools.generic.ValueParser-">initLogger</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isConfigLocked--">isConfigLocked</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#isSafeMode--">isSafeMode</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setLockConfig-boolean-">setLockConfig</a>, <a href="../../../../../org/apache/velocity/tools/generic/SafeConfig.html#setSafeMode-boolean-">setSafeMode</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_NEW_ITEMS_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_NEW_ITEMS_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_NEW_ITEMS_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.view.PagerTool.DEFAULT_NEW_ITEMS_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_INDEX_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_INDEX_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_INDEX_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.view.PagerTool.DEFAULT_INDEX_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_ITEMS_PER_PAGE_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ITEMS_PER_PAGE_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_ITEMS_PER_PAGE_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.view.PagerTool.DEFAULT_ITEMS_PER_PAGE_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_SLIP_SIZE_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_SLIP_SIZE_KEY</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_SLIP_SIZE_KEY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.view.PagerTool.DEFAULT_SLIP_SIZE_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_ITEMS_PER_PAGE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ITEMS_PER_PAGE</h4>
<pre>public static final&nbsp;int DEFAULT_ITEMS_PER_PAGE</pre>
<div class="block">the default number of items shown per page</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.view.PagerTool.DEFAULT_ITEMS_PER_PAGE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_SLIP_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_SLIP_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_SLIP_SIZE</pre>
<div class="block">the default max number of page indices to list</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.velocity.tools.view.PagerTool.DEFAULT_SLIP_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="STORED_ITEMS_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STORED_ITEMS_KEY</h4>
<pre>protected static final&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> STORED_ITEMS_KEY</pre>
<div class="block">the key under which items are stored in session</div>
</li>
</ul>
<a name="session">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>session</h4>
<pre>protected&nbsp;javax.servlet.http.HttpSession session</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="PagerTool--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PagerTool</h4>
<pre>public&nbsp;PagerTool()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setRequest-javax.servlet.http.HttpServletRequest-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRequest</h4>
<pre>public&nbsp;void&nbsp;setRequest(javax.servlet.http.HttpServletRequest&nbsp;request)</pre>
<div class="block">Initializes this tool with the specified <code>HttpServletRequest</code>.
This is required for this tool to operate and will throw a
NullPointerException if this is not set or is set to <code>null</code>.</div>
</li>
</ul>
<a name="setup-javax.servlet.http.HttpServletRequest-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setup</h4>
<pre>public&nbsp;void&nbsp;setup(javax.servlet.http.HttpServletRequest&nbsp;request)</pre>
<div class="block">Sets the index, itemsPerPage, and/or slipSize *if* they are set
in the request parameters. Likewise, this will set the item list
to be paged *if* there is a list pushed into the request attributes
under the <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getNewItemsKey--"><code>getNewItemsKey()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the current HttpServletRequest</dd>
</dl>
</li>
</ul>
<a name="setNewItemsKey-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNewItemsKey</h4>
<pre>public&nbsp;void&nbsp;setNewItemsKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
</li>
</ul>
<a name="getNewItemsKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewItemsKey</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getNewItemsKey()</pre>
</li>
</ul>
<a name="setIndexKey-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndexKey</h4>
<pre>public&nbsp;void&nbsp;setIndexKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
</li>
</ul>
<a name="getIndexKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndexKey</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getIndexKey()</pre>
</li>
</ul>
<a name="setItemsPerPageKey-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setItemsPerPageKey</h4>
<pre>public&nbsp;void&nbsp;setItemsPerPageKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
</li>
</ul>
<a name="getItemsPerPageKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemsPerPageKey</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getItemsPerPageKey()</pre>
</li>
</ul>
<a name="setSlipSizeKey-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSlipSizeKey</h4>
<pre>public&nbsp;void&nbsp;setSlipSizeKey(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
</li>
</ul>
<a name="getSlipSizeKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSlipSizeKey</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getSlipSizeKey()</pre>
</li>
</ul>
<a name="setCreateSession-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCreateSession</h4>
<pre>public&nbsp;void&nbsp;setCreateSession(boolean&nbsp;createSession)</pre>
</li>
</ul>
<a name="getCreateSession--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCreateSession</h4>
<pre>public&nbsp;boolean&nbsp;getCreateSession()</pre>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block">Sets the item list to null, page index to zero, and
items per page to the default.</div>
</li>
</ul>
<a name="setItems-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setItems</h4>
<pre>public&nbsp;void&nbsp;setItems(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;items)</pre>
<div class="block">Sets the List to page through.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>items</code> - - the <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> of items to be paged through</dd>
</dl>
</li>
</ul>
<a name="setIndex-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndex</h4>
<pre>public&nbsp;void&nbsp;setIndex(int&nbsp;index)</pre>
<div class="block">Sets the index of the first result in the current page</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - the result index to start the current page with</dd>
</dl>
</li>
</ul>
<a name="setItemsPerPage-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setItemsPerPage</h4>
<pre>public&nbsp;void&nbsp;setItemsPerPage(int&nbsp;itemsPerPage)</pre>
<div class="block">Sets the number of items returned in a page of items</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>itemsPerPage</code> - the number of items to be returned per page</dd>
</dl>
</li>
</ul>
<a name="setSlipSize-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSlipSize</h4>
<pre>public&nbsp;void&nbsp;setSlipSize(int&nbsp;slipSize)</pre>
<div class="block">Sets the number of result page indices for <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--"><code>getSlip()</code></a> to list.
(for google-ish result page links).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>slipSize</code> - - the number of result page indices to list</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--"><code>getSlip()</code></a></dd>
</dl>
</li>
</ul>
<a name="getItemsPerPage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItemsPerPage</h4>
<pre>public&nbsp;int&nbsp;getItemsPerPage()</pre>
<div class="block">Returns the set number of items to be displayed per page of items</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>current number of items shown per page</dd>
</dl>
</li>
</ul>
<a name="getSlipSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSlipSize</h4>
<pre>public&nbsp;int&nbsp;getSlipSize()</pre>
<div class="block">Returns the number of result page indices <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--"><code>getSlip()</code></a>
will return per request (if available).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of result page indices <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getSlip--"><code>getSlip()</code></a>
will try to return</dd>
</dl>
</li>
</ul>
<a name="getIndex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndex</h4>
<pre>public&nbsp;int&nbsp;getIndex()</pre>
<div class="block">Returns the current search result index.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the index for the beginning of the current page</dd>
</dl>
</li>
</ul>
<a name="hasItems--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasItems</h4>
<pre>public&nbsp;boolean&nbsp;hasItems()</pre>
<div class="block">Checks whether or not the result list is empty.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the result list is not empty.</dd>
</dl>
</li>
</ul>
<a name="getItems--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getItems</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;getItems()</pre>
<div class="block">Returns the item list. This is guaranteed
to never return <code>null</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> of all the items</dd>
</dl>
</li>
</ul>
<a name="getLastIndex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLastIndex</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;getLastIndex()</pre>
<div class="block">Returns the index of the last item on the current page of results
(as determined by the current index, items per page, and
the number of items). If there is no current page, then null is
returned.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>index for the last item on this page or <code>null</code>
if none exists</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>VelocityTools 1.3</dd>
</dl>
</li>
</ul>
<a name="getNextIndex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextIndex</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;getNextIndex()</pre>
<div class="block">Returns the index for the next page of items
(as determined by the current index, items per page, and
the number of items). If no "next page" exists, then null is
returned.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>index for the next page or <code>null</code> if none exists</dd>
</dl>
</li>
</ul>
<a name="getFirstIndex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirstIndex</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;getFirstIndex()</pre>
<div class="block">Returns the index of the first item on the current page of results
(as determined by the current index, items per page, and
the number of items). If there is no current page, then null is
returned. This is different than <a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getIndex--"><code>getIndex()</code></a> in that it
is adjusted to fit the reality of the items available and is not a
mere accessor for the current, user-set index value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>index for the first item on this page or <code>null</code>
if none exists</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>VelocityTools 1.3</dd>
</dl>
</li>
</ul>
<a name="getPrevIndex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrevIndex</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;getPrevIndex()</pre>
<div class="block">Return the index for the previous page of items
(as determined by the current index, items per page, and
the number of items). If no "next page" exists, then null is
returned.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>index for the previous page or <code>null</code> if none exists</dd>
</dl>
</li>
</ul>
<a name="getPagesAvailable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPagesAvailable</h4>
<pre>public&nbsp;int&nbsp;getPagesAvailable()</pre>
<div class="block">Returns the number of pages that can be made from this list
given the set number of items per page.</div>
</li>
</ul>
<a name="getPage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPage</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;getPage()</pre>
<div class="block">Returns the current "page" of search items.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> of items for the "current page"</dd>
</dl>
</li>
</ul>
<a name="getPageNumber-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPageNumber</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;getPageNumber(int&nbsp;i)</pre>
<div class="block">Returns the "page number" for the specified index. Because the page
number is used for the user interface, the page numbers are 1-based.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>i</code> - the index that you want the page number for</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the approximate "page number" for the specified index or
<code>null</code> if there are no items</dd>
</dl>
</li>
</ul>
<a name="getPageNumber--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPageNumber</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;getPageNumber()</pre>
<div class="block">Returns the "page number" for the current index. Because the page
number is used for the user interface, the page numbers are 1-based.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the approximate "page number" for the current index or
<code>null</code> if there are no items</dd>
</dl>
</li>
</ul>
<a name="getTotal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTotal</h4>
<pre>public&nbsp;int&nbsp;getTotal()</pre>
<div class="block">Returns the total number of items available.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>VelocityTools 1.3</dd>
</dl>
</li>
</ul>
<a name="getPageDescription--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPageDescription</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getPageDescription()</pre>
<div class="block"><p>Returns a description of the current page. This implementation
displays a 1-based range of result indices and the total number
of items. (e.g. "1 - 10 of 42" or "7 of 7") If there are no items,
this will return "0 of 0".</p>
<p>Sub-classes may override this to provide a customized
description (such as one in another language).</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a description of the current page</dd>
</dl>
</li>
</ul>
<a name="getSlip--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSlip</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;getSlip()</pre>
<div class="block">Returns a <b>S</b>liding <b>L</b>ist of <b>I</b>ndices for <b>P</b>ages
of items.
<p>Essentially, this returns a list of item indices that correspond
to available pages of items (as based on the set items-per-page).
This makes it relativly easy to do a google-ish set of links to
available pages.</p>
<p>Note that this list of Integers is 0-based to correspond with the
underlying result indices and not the displayed page numbers (see
<a href="../../../../../org/apache/velocity/tools/view/PagerTool.html#getPageNumber-int-"><code>getPageNumber(int)</code></a>).</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> of Integers representing the indices of result
pages or empty list if there's one or less pages available</dd>
</dl>
</li>
</ul>
<a name="getStoredItems--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStoredItems</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;getStoredItems()</pre>
<div class="block">Retrieves stored search items (if any) from the user's
session attributes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> retrieved from memory</dd>
</dl>
</li>
</ul>
<a name="setStoredItems-java.util.List-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setStoredItems</h4>
<pre>protected&nbsp;void&nbsp;setStoredItems(<a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&nbsp;items)</pre>
<div class="block">Stores current search items in the user's session attributes
(if one currently exists) in order to do efficient result pagination.
<p>Override this to store search items somewhere besides the
HttpSession or to prevent storage of items across requests. In
the former situation, you must also override getStoredItems().</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>items</code> - the <a href="https://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> to be stored</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PagerTool.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/velocity/tools/view/LinkTool.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/velocity/tools/view/ParameterTool.html" title="class in org.apache.velocity.tools.view"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/velocity/tools/view/PagerTool.html" target="_top">Frames</a></li>
<li><a href="PagerTool.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2018 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>