Added: 
jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractPagerTool.html
URL: 
http://svn.apache.org/viewcvs/jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractPagerTool.html?rev=326968&view=auto
==============================================================================
--- 
jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractPagerTool.html
 (added)
+++ 
jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractPagerTool.html
 Thu Oct 20 11:34:40 2005
@@ -0,0 +1,1094 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>

+<!--NewPage-->

+<HTML>

+<HEAD>

+<!-- Generated by javadoc (build 1.5.0_02) on Thu Oct 20 10:35:35 PDT 2005 -->

+<TITLE>

+AbstractPagerTool (Velocity Tools 1.2 Documentation)

+</TITLE>

+

+<META NAME="keywords" 
CONTENT="org.apache.velocity.tools.view.tools.AbstractPagerTool class">

+

+<LINK REL ="stylesheet" TYPE="text/css" 
HREF="../../../../../../stylesheet.css" TITLE="Style">

+

+<SCRIPT type="text/javascript">

+function windowTitle()

+{

+    parent.document.title="AbstractPagerTool (Velocity Tools 1.2 
Documentation)";

+}

+</SCRIPT>

+<NOSCRIPT>

+</NOSCRIPT>

+

+</HEAD>

+

+<BODY BGCOLOR="white" onload="windowTitle();">

+

+

+<!-- ========= START OF TOP NAVBAR ======= -->

+<A NAME="navbar_top"><!-- --></A>

+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>

+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">

+<TR>

+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">

+<A NAME="navbar_top_firstrow"><!-- --></A>

+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">

+  <TR ALIGN="center" VALIGN="top">

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../overview-summary.html"><FONT 
CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="package-summary.html"><FONT 
CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT 
CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="package-tree.html"><FONT 
CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../deprecated-list.html"><FONT 
CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../index-all.html"><FONT 
CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../help-doc.html"><FONT 
CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>

+  </TR>

+</TABLE>

+</TD>

+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

+</EM>

+</TD>

+</TR>

+

+<TR>

+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

+&nbsp;PREV CLASS&nbsp;

+&nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html"
 title="class in org.apache.velocity.tools.view.tools"><B>NEXT 
CLASS</B></A></FONT></TD>

+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

+  <A 
HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/AbstractPagerTool.html"
 target="_top"><B>FRAMES</B></A>  &nbsp;

+&nbsp;<A HREF="AbstractPagerTool.html" target="_top"><B>NO FRAMES</B></A>  
&nbsp;

+&nbsp;<SCRIPT type="text/javascript">

+  <!--

+  if(window==top) {

+    document.writeln('<A 
HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');

+  }

+  //-->

+</SCRIPT>

+<NOSCRIPT>

+  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>

+</NOSCRIPT>

+

+

+</FONT></TD>

+</TR>

+<TR>

+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

+  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A 
HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A 
HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A 
HREF="#method_summary">METHOD</A></FONT></TD>

+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A 
HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A 
HREF="#method_detail">METHOD</A></FONT></TD>

+</TR>

+</TABLE>

+<A NAME="skip-navbar_top"></A>

+<!-- ========= END OF TOP NAVBAR ========= -->

+

+<HR>

+<!-- ======== START OF CLASS DATA ======== -->

+<H2>

+<FONT SIZE="-1">

+org.apache.velocity.tools.view.tools</FONT>

+<BR>

+Class AbstractPagerTool</H2>

+<PRE>

+java.lang.Object

+  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by 
"><B>org.apache.velocity.tools.view.tools.AbstractPagerTool</B>

+</PRE>

+<DL>

+<DT><B>All Implemented Interfaces:</B> <DD><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/ViewTool.html" 
title="interface in org.apache.velocity.tools.view.tools">ViewTool</A></DD>

+</DL>

+<DL>

+<DT><B>Direct Known Subclasses:</B> <DD><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html"
 title="class in 
org.apache.velocity.tools.view.tools">AbstractSearchTool</A></DD>

+</DL>

+<HR>

+<DL>

+<DT><PRE>public abstract class <B>AbstractPagerTool</B><DT>extends 
java.lang.Object<DT>implements <A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/ViewTool.html" 
title="interface in org.apache.velocity.tools.view.tools">ViewTool</A></DL>

+</PRE>

+

+<P>

+<p>Abstract view tool for doing request-based pagination of

+ items in an a list.

+ </p>

+ <p><b>Usage:</b><br>

+ To use this class, you must extend it and implement

+ the setup(HttpServletRequest) method.

+ <p>

+ The setup(HttpServletRequest) method ought to extract

+ from the current request the current list index and,

+ optionally, the number of items to display per page.

+ Upon extracting these parameters, they should be set using

+ the provided setIndex(int) and setItemsPerPage(int) methods.

+ A simple implementation would be:

+ <pre>

+ public void setup(HttpServletRequest req)

+ {

+     ParameterParser pp = new ParameterParser(req);

+     setIndex(pp.getInt("index", 0));

+     setItemsPerPage(pp.getInt("show", DEFAULT_ITEMS_PER_PAGE));

+ }

+ </pre>

+ You can also set the list of items to be paged at this point

+ using the setItems(List) method, or you can always set the

+ item list at another point (even from within the template).

+ </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.setRelative('pager.vm').addQueryData("find",$!pager.criteria).addQueryData("show",$!pager.itemsPerPage)
 )

+       #if( $pager.prevIndex )

+           &lt;a 
href="$pagelink.addQueryData('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.addQueryData('index',$!index)"&gt;$!pager.getPageNumber($index)&lt;/a&gt;

+         #end

+       #end

+       #if( $pager.nextIndex )

+           &lt;a 
href="$pagelink.addQueryData('index',$!pager.nextIndex)"&gt;Next&lt;/a&gt;

+       #end

+     #end

+   #else

+   No items in list.

+   #end

+ </pre>

+

+ The output of this might look like:<br><br>

+   Showing 1-5 of 8<br>

+   1. foo<br>

+   2. bar<br>

+   3. blah<br>

+   4. woogie<br>

+   5. baz<br><br>

+   <b>1</b> <a href="">2</a> <a href="">Next</a>

+ </p>

+ <p>

+ <b>Example toolbox.xml configuration:</b>

+ <pre>&lt;tool&gt;

+   &lt;key&gt;pager&lt;/key&gt;

+   &lt;scope&gt;request&lt;/scope&gt;

+   &lt;class&gt;com.foo.tools.MyPagerTool&lt;/class&gt;

+ &lt;/tool&gt;

+ </pre>

+ </p>

+<P>

+

+<P>

+<DL>

+<DT><B>Since:</B></DT>

+  <DD>VelocityTools 1.2</DD>

+<DT><B>Version:</B></DT>

+  <DD>$Revision: 72099 $ $Date: 2004-11-10 19:45:19 -0800 (Wed, 10 Nov 2004) 
$</DD>

+<DT><B>Author:</B></DT>

+  <DD><a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a></DD>

+</DL>

+<HR>

+

+<P>

+<!-- =========== FIELD SUMMARY =========== -->

+

+<A NAME="field_summary"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">

+<B>Field Summary</B></FONT></TH>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>static&nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#DEFAULT_ITEMS_PER_PAGE">DEFAULT_ITEMS_PER_PAGE</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the default number 
of items shown per page</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>static&nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#DEFAULT_SLIP_SIZE">DEFAULT_SLIP_SIZE</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the default max 
number of page indices to list</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>private &nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#index">index</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>private &nbsp;java.util.List</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#items">items</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>private &nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#itemsPerPage">itemsPerPage</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>protected &nbsp;javax.servlet.http.HttpSession</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#session">session</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>private &nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#slipSize">slipSize</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>protected static&nbsp;java.lang.String</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#STORED_ITEMS_KEY">STORED_ITEMS_KEY</A></B></CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the key under 
which items are stored in session</TD>

+</TR>

+</TABLE>

+&nbsp;

+<!-- ======== CONSTRUCTOR SUMMARY ======== -->

+

+<A NAME="constructor_summary"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">

+<B>Constructor Summary</B></FONT></TH>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#AbstractPagerTool()">AbstractPagerTool</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

+</TR>

+</TABLE>

+&nbsp;

+<!-- ========== METHOD SUMMARY =========== -->

+

+<A NAME="method_summary"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">

+<B>Method Summary</B></FONT></TH>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getIndex()">getIndex</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the 
current search result index.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.util.List</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getItems()">getItems</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the item 
list.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getItemsPerPage()">getItemsPerPage</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the set 
number of items to be displayed per page of items</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.lang.Integer</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getNextIndex()">getNextIndex</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index 
for the next page of items

+ (as determined by the current index, items per page, and

+ the number of items).</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.util.List</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPage()">getPage</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the 
current "page" of search items.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.lang.String</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPageDescription()">getPageDescription</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a 
description of the current page.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.lang.Integer</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPageNumber()">getPageNumber</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the "page 
number" for the current index.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.lang.Integer</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPageNumber(int)">getPageNumber</A></B>(int&nbsp;i)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the "page 
number" for the specified index.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPagesAvailable()">getPagesAvailable</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number 
of pages that can be made from this list

+ given the set number of items per page.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.lang.Integer</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPrevIndex()">getPrevIndex</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the index 
for the previous page of items

+ (as determined by the current index, items per page, and

+ the number of items).</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;java.util.List</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()">getSlip</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a 
<b>S</b>liding <b>L</b>ist of <b>I</b>ndices for <b>P</b>ages

+ of items.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;int</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlipSize()">getSlipSize</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number 
of result page indices <A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()"><CODE>getSlip()</CODE></A>

+ will return per request (if available).</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>protected &nbsp;java.util.List</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getStoredItems()">getStoredItems</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves stored 
search items (if any) from the user's

+ session attributes.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;boolean</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#hasItems()">hasItems</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether or 
not the result list is empty.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#init(java.lang.Object)">init</A></B>(java.lang.Object&nbsp;obj)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes this 
instance by grabbing the request

+ and session objects from the current ViewContext.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#reset()">reset</A></B>()</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the item list 
to null, page index to zero, and

+ items per page to the default.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setIndex(int)">setIndex</A></B>(int&nbsp;index)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the index of 
the first result in the current page</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setItems(java.util.List)">setItems</A></B>(java.util.List&nbsp;items)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the List to 
page through.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setItemsPerPage(int)">setItemsPerPage</A></B>(int&nbsp;itemsPerPage)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the number of 
items returned in a page of items</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>&nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setSlipSize(int)">setSlipSize</A></B>(int&nbsp;slipSize)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the number of 
result page indices for <A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()"><CODE>getSlip()</CODE></A>
 to list.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>protected &nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setStoredItems(java.util.List)">setStoredItems</A></B>(java.util.List&nbsp;items)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stores current 
search items in the user's session attributes

+ (if one currently exists) in order to do efficient result pagination.</TD>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

+<CODE>abstract &nbsp;void</CODE></FONT></TD>

+<TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setup(javax.servlet.http.HttpServletRequest)">setup</A></B>(javax.servlet.http.HttpServletRequest&nbsp;request)</CODE>

+

+<BR>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Abstract method to 
make it as obvious as possible just

+ where implementing classes should be retrieving and configuring

+ display parameters.</TD>

+</TR>

+</TABLE>

+&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">

+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>

+</TR>

+<TR BGCOLOR="white" CLASS="TableRowColor">

+<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, 
toString, wait, wait, wait</CODE></TD>

+</TR>

+</TABLE>

+&nbsp;

+<P>

+

+<!-- ============ FIELD DETAIL =========== -->

+

+<A NAME="field_detail"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">

+<B>Field Detail</B></FONT></TH>

+</TR>

+</TABLE>

+

+<A NAME="DEFAULT_ITEMS_PER_PAGE"><!-- --></A><H3>

+DEFAULT_ITEMS_PER_PAGE</H3>

+<PRE>

+public static final int <B>DEFAULT_ITEMS_PER_PAGE</B></PRE>

+<DL>

+<DD>the default number of items shown per page

+<P>

+<DL>

+<DT><B>See Also:</B><DD><A 
HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.AbstractPagerTool.DEFAULT_ITEMS_PER_PAGE">Constant
 Field Values</A></DL>

+</DL>

+<HR>

+

+<A NAME="DEFAULT_SLIP_SIZE"><!-- --></A><H3>

+DEFAULT_SLIP_SIZE</H3>

+<PRE>

+public static final int <B>DEFAULT_SLIP_SIZE</B></PRE>

+<DL>

+<DD>the default max number of page indices to list

+<P>

+<DL>

+<DT><B>See Also:</B><DD><A 
HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.AbstractPagerTool.DEFAULT_SLIP_SIZE">Constant
 Field Values</A></DL>

+</DL>

+<HR>

+

+<A NAME="STORED_ITEMS_KEY"><!-- --></A><H3>

+STORED_ITEMS_KEY</H3>

+<PRE>

+protected static final java.lang.String <B>STORED_ITEMS_KEY</B></PRE>

+<DL>

+<DD>the key under which items are stored in session

+<P>

+<DL>

+</DL>

+</DL>

+<HR>

+

+<A NAME="items"><!-- --></A><H3>

+items</H3>

+<PRE>

+private java.util.List <B>items</B></PRE>

+<DL>

+<DL>

+</DL>

+</DL>

+<HR>

+

+<A NAME="index"><!-- --></A><H3>

+index</H3>

+<PRE>

+private int <B>index</B></PRE>

+<DL>

+<DL>

+</DL>

+</DL>

+<HR>

+

+<A NAME="slipSize"><!-- --></A><H3>

+slipSize</H3>

+<PRE>

+private int <B>slipSize</B></PRE>

+<DL>

+<DL>

+</DL>

+</DL>

+<HR>

+

+<A NAME="itemsPerPage"><!-- --></A><H3>

+itemsPerPage</H3>

+<PRE>

+private int <B>itemsPerPage</B></PRE>

+<DL>

+<DL>

+</DL>

+</DL>

+<HR>

+

+<A NAME="session"><!-- --></A><H3>

+session</H3>

+<PRE>

+protected javax.servlet.http.HttpSession <B>session</B></PRE>

+<DL>

+<DL>

+</DL>

+</DL>

+

+<!-- ========= CONSTRUCTOR DETAIL ======== -->

+

+<A NAME="constructor_detail"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">

+<B>Constructor Detail</B></FONT></TH>

+</TR>

+</TABLE>

+

+<A NAME="AbstractPagerTool()"><!-- --></A><H3>

+AbstractPagerTool</H3>

+<PRE>

+public <B>AbstractPagerTool</B>()</PRE>

+<DL>

+</DL>

+

+<!-- ============ METHOD DETAIL ========== -->

+

+<A NAME="method_detail"><!-- --></A>

+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">

+<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">

+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">

+<B>Method Detail</B></FONT></TH>

+</TR>

+</TABLE>

+

+<A NAME="init(java.lang.Object)"><!-- --></A><H3>

+init</H3>

+<PRE>

+public void <B>init</B>(java.lang.Object&nbsp;obj)</PRE>

+<DL>

+<DD>Initializes this instance by grabbing the request

+ and session objects from the current ViewContext.

+<P>

+<DD><DL>

+<DT><B>Specified by:</B><DD><CODE><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/ViewTool.html#init(java.lang.Object)">init</A></CODE>
 in interface <CODE><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/ViewTool.html" 
title="interface in 
org.apache.velocity.tools.view.tools">ViewTool</A></CODE></DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the current ViewContext

+<DT><B>Throws:</B>

+<DD><CODE>java.lang.ClassCastException</CODE> - if the param is not a 
ViewContext</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="setup(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>

+setup</H3>

+<PRE>

+public abstract void 
<B>setup</B>(javax.servlet.http.HttpServletRequest&nbsp;request)</PRE>

+<DL>

+<DD>Abstract method to make it as obvious as possible just

+ where implementing classes should be retrieving and configuring

+ display parameters.

+ <p>A simple implementation would be:

+ <pre>

+ public void setup(HttpServletRequest req)

+ {

+     ParameterParser pp = new ParameterParser(req);

+     setIndex(pp.getInt("index", 0));

+     setItemsPerPage(pp.getInt("show", DEFAULT_ITEMS_PER_PAGE));

+ }

+ </pre>

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>request</CODE> - the current 
HttpServletRequest</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="reset()"><!-- --></A><H3>

+reset</H3>

+<PRE>

+public void <B>reset</B>()</PRE>

+<DL>

+<DD>Sets the item list to null, page index to zero, and

+ items per page to the default.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="setItems(java.util.List)"><!-- --></A><H3>

+setItems</H3>

+<PRE>

+public void <B>setItems</B>(java.util.List&nbsp;items)</PRE>

+<DL>

+<DD>Sets the List to page through.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>items</CODE> - - the  <CODE>List</CODE> of 
items to be paged through</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="setIndex(int)"><!-- --></A><H3>

+setIndex</H3>

+<PRE>

+public void <B>setIndex</B>(int&nbsp;index)</PRE>

+<DL>

+<DD>Sets the index of the first result in the current page

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>index</CODE> - the result index to start the 
current page with</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="setItemsPerPage(int)"><!-- --></A><H3>

+setItemsPerPage</H3>

+<PRE>

+public void <B>setItemsPerPage</B>(int&nbsp;itemsPerPage)</PRE>

+<DL>

+<DD>Sets the number of items returned in a page of items

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>itemsPerPage</CODE> - the number of items to 
be returned per page</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="setSlipSize(int)"><!-- --></A><H3>

+setSlipSize</H3>

+<PRE>

+public void <B>setSlipSize</B>(int&nbsp;slipSize)</PRE>

+<DL>

+<DD>Sets the number of result page indices for <A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()"><CODE>getSlip()</CODE></A>
 to list.

+ (for google-ish result page links).

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>slipSize</CODE> - - the number of result page 
indices to list<DT><B>See Also:</B><DD><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()"><CODE>getSlip()</CODE></A></DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getItemsPerPage()"><!-- --></A><H3>

+getItemsPerPage</H3>

+<PRE>

+public int <B>getItemsPerPage</B>()</PRE>

+<DL>

+<DD>Returns the set number of items to be displayed per page of items

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>current number of items shown per page</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getSlipSize()"><!-- --></A><H3>

+getSlipSize</H3>

+<PRE>

+public int <B>getSlipSize</B>()</PRE>

+<DL>

+<DD>Returns the number of result page indices <A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()"><CODE>getSlip()</CODE></A>

+ will return per request (if available).

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>the number of result page indices <A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()"><CODE>getSlip()</CODE></A>

+         will try to return</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getIndex()"><!-- --></A><H3>

+getIndex</H3>

+<PRE>

+public int <B>getIndex</B>()</PRE>

+<DL>

+<DD>Returns the current search result index.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>the index for the beginning of the current page</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="hasItems()"><!-- --></A><H3>

+hasItems</H3>

+<PRE>

+public boolean <B>hasItems</B>()</PRE>

+<DL>

+<DD>Checks whether or not the result list is empty.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD><code>true</code> if the result list is not empty.</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getItems()"><!-- --></A><H3>

+getItems</H3>

+<PRE>

+public java.util.List <B>getItems</B>()</PRE>

+<DL>

+<DD>Returns the item list. This is guaranteed

+ to never return <code>null</code>.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD><CODE>List</CODE> of all the items</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getNextIndex()"><!-- --></A><H3>

+getNextIndex</H3>

+<PRE>

+public java.lang.Integer <B>getNextIndex</B>()</PRE>

+<DL>

+<DD>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.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>index for the next page or <code>null</code> if none 
exists</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getPrevIndex()"><!-- --></A><H3>

+getPrevIndex</H3>

+<PRE>

+public java.lang.Integer <B>getPrevIndex</B>()</PRE>

+<DL>

+<DD>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.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>index for the previous page or <code>null</code> if 
none exists</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getPagesAvailable()"><!-- --></A><H3>

+getPagesAvailable</H3>

+<PRE>

+public int <B>getPagesAvailable</B>()</PRE>

+<DL>

+<DD>Returns the number of pages that can be made from this list

+ given the set number of items per page.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getPage()"><!-- --></A><H3>

+getPage</H3>

+<PRE>

+public java.util.List <B>getPage</B>()</PRE>

+<DL>

+<DD>Returns the current "page" of search items.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>a <CODE>List</CODE> of items for the "current page"</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getPageNumber(int)"><!-- --></A><H3>

+getPageNumber</H3>

+<PRE>

+public java.lang.Integer <B>getPageNumber</B>(int&nbsp;i)</PRE>

+<DL>

+<DD>Returns the "page number" for the specified index.  Because the page

+ number is used for the user interface, the page numbers are 1-based.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>i</CODE> - the index that you want the page 
number for

+<DT><B>Returns:</B><DD>the approximate "page number" for the specified index or

+         <code>null</code> if there are no items</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getPageNumber()"><!-- --></A><H3>

+getPageNumber</H3>

+<PRE>

+public java.lang.Integer <B>getPageNumber</B>()</PRE>

+<DL>

+<DD>Returns the "page number" for the current index.  Because the page

+ number is used for the user interface, the page numbers are 1-based.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>the approximate "page number" for the current index or

+         <code>null</code> if there are no items</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getPageDescription()"><!-- --></A><H3>

+getPageDescription</H3>

+<PRE>

+public java.lang.String <B>getPageDescription</B>()</PRE>

+<DL>

+<DD><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")</p>

+

+ <p>Sub-classes may override this to provide a customized

+ description (such as one in another language).</p>

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>a description of the current page</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getSlip()"><!-- --></A><H3>

+getSlip</H3>

+<PRE>

+public java.util.List <B>getSlip</B>()</PRE>

+<DL>

+<DD>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/tools/AbstractPagerTool.html#getPageNumber(int)"><CODE>getPageNumber(int)</CODE></A>).</p>

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD><CODE>List</CODE> of Integers representing the indices 
of result

+         pages or empty list if there's one or less pages available</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="getStoredItems()"><!-- --></A><H3>

+getStoredItems</H3>

+<PRE>

+protected java.util.List <B>getStoredItems</B>()</PRE>

+<DL>

+<DD>Retrieves stored search items (if any) from the user's

+ session attributes.

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+

+<DT><B>Returns:</B><DD>the <CODE>List</CODE> retrieved from memory</DL>

+</DD>

+</DL>

+<HR>

+

+<A NAME="setStoredItems(java.util.List)"><!-- --></A><H3>

+setStoredItems</H3>

+<PRE>

+protected void <B>setStoredItems</B>(java.util.List&nbsp;items)</PRE>

+<DL>

+<DD>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>

+<P>

+<DD><DL>

+</DL>

+</DD>

+<DD><DL>

+<DT><B>Parameters:</B><DD><CODE>items</CODE> - the <CODE>List</CODE> to be 
stored</DL>

+</DD>

+</DL>

+<!-- ========= END OF CLASS DATA ========= -->

+<HR>

+

+

+<!-- ======= START OF BOTTOM NAVBAR ====== -->

+<A NAME="navbar_bottom"><!-- --></A>

+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>

+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">

+<TR>

+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">

+<A NAME="navbar_bottom_firstrow"><!-- --></A>

+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">

+  <TR ALIGN="center" VALIGN="top">

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../overview-summary.html"><FONT 
CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="package-summary.html"><FONT 
CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT 
CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="package-tree.html"><FONT 
CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../deprecated-list.html"><FONT 
CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../index-all.html"><FONT 
CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>

+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A 
HREF="../../../../../../help-doc.html"><FONT 
CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>

+  </TR>

+</TABLE>

+</TD>

+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

+</EM>

+</TD>

+</TR>

+

+<TR>

+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

+&nbsp;PREV CLASS&nbsp;

+&nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html"
 title="class in org.apache.velocity.tools.view.tools"><B>NEXT 
CLASS</B></A></FONT></TD>

+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

+  <A 
HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/AbstractPagerTool.html"
 target="_top"><B>FRAMES</B></A>  &nbsp;

+&nbsp;<A HREF="AbstractPagerTool.html" target="_top"><B>NO FRAMES</B></A>  
&nbsp;

+&nbsp;<SCRIPT type="text/javascript">

+  <!--

+  if(window==top) {

+    document.writeln('<A 
HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');

+  }

+  //-->

+</SCRIPT>

+<NOSCRIPT>

+  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>

+</NOSCRIPT>

+

+

+</FONT></TD>

+</TR>

+<TR>

+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

+  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A 
HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A 
HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A 
HREF="#method_summary">METHOD</A></FONT></TD>

+<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

+DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A 
HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A 
HREF="#method_detail">METHOD</A></FONT></TD>

+</TR>

+</TABLE>

+<A NAME="skip-navbar_bottom"></A>

+<!-- ======== END OF BOTTOM NAVBAR ======= -->

+

+<HR>

+Copyright (c) 2003 Apache Software Foundation

+</BODY>

+</HTML>


Modified: 
jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html
URL: 
http://svn.apache.org/viewcvs/jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html?rev=326968&r1=326967&r2=326968&view=diff
==============================================================================
--- 
jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html
 (original)
+++ 
jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html
 Thu Oct 20 11:34:40 2005
@@ -2,9 +2,9 @@
 <!--NewPage-->
 <HTML>
 <HEAD>
-<!-- Generated by javadoc (build 1.4.2_01) on Fri Mar 12 02:01:06 GMT 2004 -->
+<!-- Generated by javadoc (build 1.5.0_02) on Thu Oct 20 10:35:35 PDT 2005 -->
 <TITLE>
-AbstractSearchTool.StoredResults (Velocity Tools 1.1-dev Documentation)
+AbstractSearchTool.StoredResults (Velocity Tools 1.2 Documentation)
 </TITLE>
 
 <META NAME="keywords" 
CONTENT="org.apache.velocity.tools.view.tools.AbstractSearchTool.StoredResults 
class">
@@ -14,9 +14,11 @@
 <SCRIPT type="text/javascript">
 function windowTitle()
 {
-    parent.document.title="AbstractSearchTool.StoredResults (Velocity Tools 
1.1-dev Documentation)";
+    parent.document.title="AbstractSearchTool.StoredResults (Velocity Tools 
1.2 Documentation)";
 }
 </SCRIPT>
+<NOSCRIPT>
+</NOSCRIPT>
 
 </HEAD>
 
@@ -28,7 +30,7 @@
 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 <TR>
-<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 <A NAME="navbar_top_firstrow"><!-- --></A>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
   <TR ALIGN="center" VALIGN="top">
@@ -50,9 +52,9 @@
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html"
 title="class in org.apache.velocity.tools.view.tools"><B>PREV 
CLASS</B></A>&nbsp;
-&nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/CookieTool.html" 
title="class in org.apache.velocity.tools.view.tools"><B>NEXT 
CLASS</B></A></FONT></TD>
+&nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/BrowserSnifferTool.html"
 title="class in org.apache.velocity.tools.view.tools"><B>NEXT 
CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-  <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A>  
&nbsp;
+  <A 
HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html"
 target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AbstractSearchTool.StoredResults.html" target="_top"><B>NO 
FRAMES</B></A>  &nbsp;
 &nbsp;<SCRIPT type="text/javascript">
   <!--
@@ -65,6 +67,7 @@
   <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 </NOSCRIPT>
 
+
 </FONT></TD>
 </TR>
 <TR>
@@ -86,7 +89,7 @@
 Class AbstractSearchTool.StoredResults</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended 
by"><B>org.apache.velocity.tools.view.tools.AbstractSearchTool.StoredResults</B>
+  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by 
"><B>org.apache.velocity.tools.view.tools.AbstractSearchTool.StoredResults</B>
 </PRE>
 <DL>
 <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
@@ -96,7 +99,8 @@
 </DL>
 <HR>
 <DL>
-<DT>public class <B>AbstractSearchTool.StoredResults</B><DT>extends 
java.lang.Object<DT>implements java.io.Serializable</DL>
+<DT><PRE>public class <B>AbstractSearchTool.StoredResults</B><DT>extends 
java.lang.Object<DT>implements java.io.Serializable</DL>
+</PRE>
 
 <P>
 Simple utility class to hold a criterion and its result list.
@@ -115,16 +119,13 @@
 <HR>
 
 <P>
-<!-- ======== NESTED CLASS SUMMARY ======== -->
-
-
 <!-- =========== FIELD SUMMARY =========== -->
 
 <A NAME="field_summary"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Field Summary</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Field Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -149,8 +150,8 @@
 <A NAME="constructor_summary"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Constructor Summary</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Constructor Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><B><A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html#AbstractSearchTool.StoredResults(java.lang.Object,
 
java.util.List)">AbstractSearchTool.StoredResults</A></B>(java.lang.Object&nbsp;crit,
@@ -166,8 +167,8 @@
 <A NAME="method_summary"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Method Summary</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Method Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -189,7 +190,7 @@
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TD><B>Methods inherited from class java.lang.Object</B></TD>
+<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, 
toString, wait, wait, wait</CODE></TD>
@@ -203,8 +204,8 @@
 <A NAME="field_detail"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Field Detail</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Field Detail</B></FONT></TH>
 </TR>
 </TABLE>
 
@@ -232,8 +233,8 @@
 <A NAME="constructor_detail"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Constructor Detail</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Constructor Detail</B></FONT></TH>
 </TR>
 </TABLE>
 
@@ -245,15 +246,17 @@
 <DL>
 <DD>Creates a new instance.
 <P>
-<DT><B>Parameters:</B><DD><CODE>list</CODE> - - the <CODE>List</CODE> of 
results to store</DL>
+<DL>
+<DT><B>Parameters:</B><DD><CODE>crit</CODE> - the criteria for these 
results<DD><CODE>list</CODE> - the <CODE>List</CODE> of results to store</DL>
+</DL>
 
 <!-- ============ METHOD DETAIL ========== -->
 
 <A NAME="method_detail"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Method Detail</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
+<B>Method Detail</B></FONT></TH>
 </TR>
 </TABLE>
 
@@ -294,7 +297,7 @@
 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 <TR>
-<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 <A NAME="navbar_bottom_firstrow"><!-- --></A>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
   <TR ALIGN="center" VALIGN="top">
@@ -316,9 +319,9 @@
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html"
 title="class in org.apache.velocity.tools.view.tools"><B>PREV 
CLASS</B></A>&nbsp;
-&nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/CookieTool.html" 
title="class in org.apache.velocity.tools.view.tools"><B>NEXT 
CLASS</B></A></FONT></TD>
+&nbsp;<A 
HREF="../../../../../../org/apache/velocity/tools/view/tools/BrowserSnifferTool.html"
 title="class in org.apache.velocity.tools.view.tools"><B>NEXT 
CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-  <A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A>  
&nbsp;
+  <A 
HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html"
 target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AbstractSearchTool.StoredResults.html" target="_top"><B>NO 
FRAMES</B></A>  &nbsp;
 &nbsp;<SCRIPT type="text/javascript">
   <!--
@@ -330,6 +333,7 @@
 <NOSCRIPT>
   <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 </NOSCRIPT>
+
 
 </FONT></TD>
 </TR>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to