You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by nb...@apache.org on 2005/10/20 20:36:27 UTC
svn commit: r326968 [17/21] - in /jakarta/velocity/tools/trunk/docs/javadoc:
./ org/apache/velocity/tools/generic/
org/apache/velocity/tools/generic/log/ org/apache/velocity/tools/struts/
org/apache/velocity/tools/view/ org/apache/velocity/tools/view/c...
Modified: jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.html
URL: http://svn.apache.org/viewcvs/jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.html?rev=326968&r1=326967&r2=326968&view=diff
==============================================================================
--- jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.html (original)
+++ jakarta/velocity/tools/trunk/docs/javadoc/org/apache/velocity/tools/view/tools/AbstractSearchTool.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 (Velocity Tools 1.1-dev Documentation)
+AbstractSearchTool (Velocity Tools 1.2 Documentation)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.velocity.tools.view.tools.AbstractSearchTool class">
@@ -14,9 +14,11 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
- parent.document.title="AbstractSearchTool (Velocity Tools 1.1-dev Documentation)";
+ parent.document.title="AbstractSearchTool (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">
@@ -49,10 +51,10 @@
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
+ <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools"><B>PREV CLASS</B></A>
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.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>
+ <A HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/AbstractSearchTool.html" target="_top"><B>FRAMES</B></A>
<A HREF="AbstractSearchTool.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
@@ -65,6 +67,7 @@
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
+
</FONT></TD>
</TR>
<TR>
@@ -86,14 +89,16 @@
Class AbstractSearchTool</H2>
<PRE>
java.lang.Object
- <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.velocity.tools.view.tools.AbstractSearchTool</B>
+ <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">org.apache.velocity.tools.view.tools.AbstractPagerTool</A>
+ <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.velocity.tools.view.tools.AbstractSearchTool</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>
<HR>
<DL>
-<DT>public abstract class <B>AbstractSearchTool</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>
+<DT><PRE>public abstract class <B>AbstractSearchTool</B><DT>extends <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></DL>
+</PRE>
<P>
<p>Abstract view tool for doing "searching" and robust
@@ -113,7 +118,7 @@
list index, and optionally, the number of items to display
per page of results. Upon extracting these parameters, they
should be set using the provided setCriteria(Object),
- setIndex(int), and setItemsPerPage(int) methods. A simple
+ setIndex(int), and setItemsPerPage(int) methods. A simple
implementation would be:
<pre>
public void setup(HttpServletRequest req)
@@ -145,28 +150,28 @@
<input type="text"name="find" value="$!search.criteria">
<input type="submit" value="Find">
</form>
- #if( $search.hasResults() )
+ #if( $search.hasItems() )
Showing $!search.pageDescription<br>
#set( $i = $search.index )
- #foreach( $result in $search.page )
- ${i}. $!result <br>
+ #foreach( $item in $search.page )
+ ${i}. $!item <br>
#set( $i = $i + 1 )
#end
<br>
#if ( $search.pagesAvailable > 1 )
- #set( $searchlink = $link.setRelative('search.vm').addQueryData("find",$!search.criteria).addQueryData("show",$!search.itemsPerPage) )
+ #set( $pagelink = $link.setRelative('search.vm').addQueryData("find",$!search.criteria).addQueryData("show",$!search.itemsPerPage) )
#if( $search.prevIndex )
- <a href="$searchlink.addQueryData('index',$!search.prevIndex)">Prev</a>
+ <a href="$pagelink.addQueryData('index',$!search.prevIndex)">Prev</a>
#end
#foreach( $index in $search.slip )
#if( $index == $search.index )
<b>$search.pageNumber</b>
#else
- <a href="$searchlink.addQueryData('index',$!index)">$!search.getPageNumber($index)</a>
+ <a href="$pagelink.addQueryData('index',$!index)">$!search.getPageNumber($index)</a>
#end
#end
#if( $search.nextIndex )
- <a href="$searchlink.addQueryData('index',$!search.nextIndex)">Next</a>
+ <a href="$pagelink.addQueryData('index',$!search.nextIndex)">Next</a>
#end
#end
#elseif( $search.criteria )
@@ -194,7 +199,7 @@
<pre><tool>
<key>search</key>
<scope>request</scope>
- <class>com.foo.tools.MyAbstractSearchTool</class>
+ <class>com.foo.tools.MySearchTool</class>
</tool>
</pre>
</p>
@@ -205,7 +210,7 @@
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.0</DD>
<DT><B>Version:</B></DT>
- <DD>$Revision: 1.8 $ $Date: 2004/03/12 02:07:22 $</DD>
+ <DD>$Revision$ $Date$</DD>
<DT><B>Author:</B></DT>
<DD><a href="mailto:nathan@esha.com">Nathan Bubna</a></DD>
</DL>
@@ -217,8 +222,8 @@
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Nested Class Summary</B></FONT></TD>
+<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
+<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -226,18 +231,16 @@
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html" title="class in org.apache.velocity.tools.view.tools">AbstractSearchTool.StoredResults</A></B></CODE>
<BR>
- Simple utility class to hold a criterion and its result list.
- </TD>
+ Simple utility class to hold a criterion and its result list.</TD>
</TR>
</TABLE>
-
-<!-- =========== FIELD 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">
@@ -249,62 +252,6 @@
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#DEFAULT_ITEMS_PER_PAGE">DEFAULT_ITEMS_PER_PAGE</A></B></CODE>
-
-<BR>
- the default number of results shown per page</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#DEFAULT_SLIP_SIZE">DEFAULT_SLIP_SIZE</A></B></CODE>
-
-<BR>
- the default max number of result page indices to list</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>private int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#index">index</A></B></CODE>
-
-<BR>
- </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>private int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#itemsPerPage">itemsPerPage</A></B></CODE>
-
-<BR>
- </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>private java.util.List</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#results">results</A></B></CODE>
-
-<BR>
- </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>protected javax.servlet.http.HttpSession</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#session">session</A></B></CODE>
-
-<BR>
- </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>private int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#slipSize">slipSize</A></B></CODE>
-
-<BR>
- </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#STORED_RESULTS_KEY">STORED_RESULTS_KEY</A></B></CODE>
@@ -312,14 +259,23 @@
the key under which StoredResults are kept in session</TD>
</TR>
</TABLE>
+ <A NAME="fields_inherited_from_class_org.apache.velocity.tools.view.tools.AbstractPagerTool"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Fields inherited from class org.apache.velocity.tools.view.tools.<A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></B></TH>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD><CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#DEFAULT_ITEMS_PER_PAGE">DEFAULT_ITEMS_PER_PAGE</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#DEFAULT_SLIP_SIZE">DEFAULT_SLIP_SIZE</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#session">session</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#STORED_ITEMS_KEY">STORED_ITEMS_KEY</A></CODE></TD>
+</TR>
+</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<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.html#AbstractSearchTool()">AbstractSearchTool</A></B>()</CODE>
@@ -334,8 +290,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">
@@ -343,9 +299,7 @@
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#executeQuery(java.lang.Object)">executeQuery</A></B>(java.lang.Object criteria)</CODE>
<BR>
- Executes a query for the specified criteria.
-
- </TD>
+ Executes a query for the specified criteria.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -353,85 +307,16 @@
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getCriteria()">getCriteria</A></B>()</CODE>
<BR>
- Return the criteria object for this request.
- </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getIndex()">getIndex</A></B>()</CODE>
-
-<BR>
- Return the current search result index.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getItemsPerPage()">getItemsPerPage</A></B>()</CODE>
-
-<BR>
- Return the set number of items to be displayed per page of results</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> java.lang.Integer</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getNextIndex()">getNextIndex</A></B>()</CODE>
-
-<BR>
- Return the index for the next page of results
- (as determined by the current index, items per page, and
- the number of results). </TD>
+ Return the criteria object for this request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.List</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getPage()">getPage</A></B>()</CODE>
-
-<BR>
- Return the current "page" of search results.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getPageDescription()">getPageDescription</A></B>()</CODE>
-
-<BR>
- 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> java.lang.Integer</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getPageNumber()">getPageNumber</A></B>()</CODE>
-
-<BR>
- 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> java.lang.Integer</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getPageNumber(int)">getPageNumber</A></B>(int i)</CODE>
-
-<BR>
- 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> int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getPagesAvailable()">getPagesAvailable</A></B>()</CODE>
-
-<BR>
- Return 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> java.lang.Integer</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getPrevIndex()">getPrevIndex</A></B>()</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getItems()">getItems</A></B>()</CODE>
<BR>
- Return the index for the previous page of results
- (as determined by the current index, items per page, and
- the number of results). </TD>
+ Gets the results for the given criteria either in memory
+ or by performing a new query for them.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -439,27 +324,16 @@
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getResults()">getResults</A></B>()</CODE>
<BR>
- Return the results for the given criteria. </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> java.util.List</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getSlip()">getSlip</A></B>()</CODE>
-
-<BR>
- Return a <b>S</b>liding <b>L</b>ist of <b>I</b>ndices for <b>P</b>ages
- of search results.
-
- </TD>
+ <B>Deprecated.</B> <I>Use <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getItems()"><CODE>AbstractPagerTool.getItems()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getSlipSize()">getSlipSize</A></B>()</CODE>
+<CODE>protected java.util.List</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getStoredItems()">getStoredItems</A></B>()</CODE>
<BR>
- Returns the number of result page indices <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getSlip()"><CODE>getSlip()</CODE></A>
- will return per request (if available).</TD>
+ 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">
@@ -476,16 +350,7 @@
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#hasResults()">hasResults</A></B>()</CODE>
<BR>
- 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> void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#init(java.lang.Object)">init</A></B>(java.lang.Object obj)</CODE>
-
-<BR>
- Initializes this instance by grabbing the request
- and session objects from the current ViewContext.</TD>
+ <B>Deprecated.</B> <I>Use <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#hasItems()"><CODE>AbstractPagerTool.hasItems()</CODE></A></I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -498,45 +363,20 @@
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>private java.util.List</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#retrieveResults()">retrieveResults</A></B>()</CODE>
-
-<BR>
- Gets the results for the given criteria either in memory
- or by performing a new query for them. </TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#setCriteria(java.lang.Object)">setCriteria</A></B>(java.lang.Object criteria)</CODE>
<BR>
- Sets the criteria for this search and clears existing results.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#setIndex(int)">setIndex</A></B>(int index)</CODE>
-
-<BR>
- Sets the index of the first result in the current page</TD>
+ Sets the criteria for this search.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#setItemsPerPage(int)">setItemsPerPage</A></B>(int itemsPerPage)</CODE>
-
-<BR>
- Sets the number of items returned in a page of results</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE> void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#setSlipSize(int)">setSlipSize</A></B>(int slipSize)</CODE>
+<CODE>protected void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#setStoredItems(java.util.List)">setStoredItems</A></B>(java.util.List items)</CODE>
<BR>
- Sets the number of result page indices for <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#getSlip()"><CODE>getSlip()</CODE></A> to list.
- </TD>
+ 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">
@@ -545,26 +385,22 @@
<BR>
Stores current search results in the user's session attributes
- (if one currently exists) in order to do efficient result pagination.
-
- </TD>
+ (if one currently exists) in order to do efficient result pagination.</TD>
+</TR>
+</TABLE>
+ <A NAME="methods_inherited_from_class_org.apache.velocity.tools.view.tools.AbstractPagerTool"><!-- --></A>
+<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
+<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
+<TH ALIGN="left"><B>Methods inherited from class org.apache.velocity.tools.view.tools.<A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>abstract void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.html#setup(javax.servlet.http.HttpServletRequest)">setup</A></B>(javax.servlet.http.HttpServletRequest request)</CODE>
-
-<BR>
- Abstract method to make it as obvious as possible just
- where implementing classes should be retrieving and configuring
- search/display parameters.
- </TD>
+<TD><CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getIndex()">getIndex</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getItemsPerPage()">getItemsPerPage</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getNextIndex()">getNextIndex</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPage()">getPage</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPageDescription()">getPageDescription</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPageNumber()">getPageNumber</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPageNumber(int)">getPageNumber</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPagesAvailable()">getPagesAvailable</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getPrevIndex()">getPrevIndex</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlip()">getSlip</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getSlipSize()">getSlipSize</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#hasItems()">hasItems</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#init(java.lang.Object)">init</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setIndex(int)">setIndex</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setItems(java.util.List)">setItems</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setItemsPerPage(int)">setItemsPerPage</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setSlipSize(int)">setSlipSize</A>, <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setup(javax.servlet.http.HttpServletRequest)">setup</A></CODE></TD>
</TR>
</TABLE>
<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>
@@ -578,35 +414,11 @@
<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>
-<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 results shown per page
-<P>
-<DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.AbstractSearchTool.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 result page indices to list
-<P>
-<DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.AbstractSearchTool.DEFAULT_SLIP_SIZE">Constant Field Values</A></DL>
-</DL>
-<HR>
-
<A NAME="STORED_RESULTS_KEY"><!-- --></A><H3>
STORED_RESULTS_KEY</H3>
<PRE>
@@ -619,16 +431,6 @@
</DL>
<HR>
-<A NAME="results"><!-- --></A><H3>
-results</H3>
-<PRE>
-private java.util.List <B>results</B></PRE>
-<DL>
-<DL>
-</DL>
-</DL>
-<HR>
-
<A NAME="criteria"><!-- --></A><H3>
criteria</H3>
<PRE>
@@ -637,54 +439,14 @@
<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">
-<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>
@@ -700,58 +462,11 @@
<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>
-<A NAME="init(java.lang.Object)"><!-- --></A><H3>
-init</H3>
-<PRE>
-public void <B>init</B>(java.lang.Object 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 request)</PRE>
-<DL>
-<DD>Abstract method to make it as obvious as possible just
- where implementing classes should be retrieving and configuring
- search/display parameters.
- <p>A simple implementation would be:
- <pre>
- public void setup(HttpServletRequest req)
- {
- ParameterParser pp = new ParameterParser(req);
- setCriteria(pp.getString("find"));
- 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>
@@ -761,7 +476,7 @@
items per page to the default.
<P>
<DD><DL>
-</DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#reset()">reset</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></CODE></DL>
</DD>
<DD><DL>
</DL>
@@ -774,66 +489,14 @@
<PRE>
public void <B>setCriteria</B>(java.lang.Object criteria)</PRE>
<DL>
-<DD>Sets the criteria for this search and clears existing results.
+<DD>Sets the criteria for this search.
<P>
<DD><DL>
-</DL>
-</DD>
-<DD><DL>
<DT><B>Parameters:</B><DD><CODE>criteria</CODE> - - the criteria used for this search</DL>
</DD>
</DL>
<HR>
-<A NAME="setIndex(int)"><!-- --></A><H3>
-setIndex</H3>
-<PRE>
-public void <B>setIndex</B>(int 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 itemsPerPage)</PRE>
-<DL>
-<DD>Sets the number of items returned in a page of results
-<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 slipSize)</PRE>
-<DL>
-<DD>Sets the number of result page indices for <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.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/AbstractSearchTool.html#getSlip()"><CODE>getSlip()</CODE></A></DL>
-</DD>
-</DL>
-<HR>
-
<A NAME="getCriteria()"><!-- --></A><H3>
getCriteria</H3>
<PRE>
@@ -844,82 +507,22 @@
just a java.lang.String)
<P>
<DD><DL>
-</DL>
-</DD>
-<DD><DL>
<DT><B>Returns:</B><DD>criteria object</DL>
</DD>
</DL>
<HR>
-<A NAME="getItemsPerPage()"><!-- --></A><H3>
-getItemsPerPage</H3>
-<PRE>
-public int <B>getItemsPerPage</B>()</PRE>
-<DL>
-<DD>Return the set number of items to be displayed per page of results
-<P>
-<DD><DL>
-</DL>
-</DD>
-<DD><DL>
-
-<DT><B>Returns:</B><DD>current number of results 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/AbstractSearchTool.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/AbstractSearchTool.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>Return 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="hasResults()"><!-- --></A><H3>
hasResults</H3>
<PRE>
public boolean <B>hasResults</B>()</PRE>
<DL>
-<DD>Checks whether or not the result list is empty.
+<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#hasItems()"><CODE>AbstractPagerTool.hasItems()</CODE></A></I>
<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>
@@ -928,195 +531,70 @@
<PRE>
public java.util.List <B>getResults</B>()</PRE>
<DL>
-<DD>Return the results for the given criteria. 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 results for the criteria</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="getNextIndex()"><!-- --></A><H3>
-getNextIndex</H3>
-<PRE>
-public java.lang.Integer <B>getNextIndex</B>()</PRE>
-<DL>
-<DD>Return the index for the next page of results
- (as determined by the current index, items per page, and
- the number of results). 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 results
- (as determined by the current index, items per page, and
- the number of results). 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>Return 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>Return the current "page" of search results.
-<P>
-<DD><DL>
-</DL>
-</DD>
-<DD><DL>
-
-<DT><B>Returns:</B><DD>a <CODE>List</CODE> of results 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 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.
+<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getItems()"><CODE>AbstractPagerTool.getItems()</CODE></A>.</I>
<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 results</DL>
-</DD>
</DL>
<HR>
-<A NAME="getPageNumber()"><!-- --></A><H3>
-getPageNumber</H3>
+<A NAME="getItems()"><!-- --></A><H3>
+getItems</H3>
<PRE>
-public java.lang.Integer <B>getPageNumber</B>()</PRE>
+public java.util.List <B>getItems</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.
+<DD>Gets the results for the given criteria either in memory
+ or by performing a new query for them. If the criteria
+ is null, an empty list will be returned.
<P>
<DD><DL>
-</DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getItems()">getItems</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></CODE></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 results</DL>
+<DT><B>Returns:</B><DD><CODE>List</CODE> of all items for the criteria</DL>
</DD>
</DL>
<HR>
-<A NAME="getPageDescription()"><!-- --></A><H3>
-getPageDescription</H3>
+<A NAME="getStoredItems()"><!-- --></A><H3>
+getStoredItems</H3>
<PRE>
-public java.lang.String <B>getPageDescription</B>()</PRE>
+protected java.util.List <B>getStoredItems</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 results. (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>
+<DD><B>Description copied from class: <CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getStoredItems()">AbstractPagerTool</A></CODE></B></DD>
+<DD>Retrieves stored search items (if any) from the user's
+ session attributes.
<P>
<DD><DL>
-</DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#getStoredItems()">getStoredItems</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></CODE></DL>
</DD>
<DD><DL>
-<DT><B>Returns:</B><DD>a description of the current page</DL>
+<DT><B>Returns:</B><DD>the <CODE>List</CODE> retrieved from memory</DL>
</DD>
</DL>
<HR>
-<A NAME="getSlip()"><!-- --></A><H3>
-getSlip</H3>
+<A NAME="setStoredItems(java.util.List)"><!-- --></A><H3>
+setStoredItems</H3>
<PRE>
-public java.util.List <B>getSlip</B>()</PRE>
+protected void <B>setStoredItems</B>(java.util.List items)</PRE>
<DL>
-<DD>Return a <b>S</b>liding <b>L</b>ist of <b>I</b>ndices for <b>P</b>ages
- of search results.
-
- <p>Essentially, this returns a list of result indices that correspond
- to available pages of search results (as based on the set
- items-per-page). This makes it relativly easy to do a google-ish set
- of links to result 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/AbstractSearchTool.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>
+<DD><B>Description copied from class: <CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setStoredItems(java.util.List)">AbstractPagerTool</A></CODE></B></DD>
+<DD>Stores current search items in the user's session attributes
+ (if one currently exists) in order to do efficient result pagination.
-<A NAME="retrieveResults()"><!-- --></A><H3>
-retrieveResults</H3>
-<PRE>
-private java.util.List <B>retrieveResults</B>()</PRE>
-<DL>
-<DD>Gets the results for the given criteria either in memory
- or by performing a new query for them. This is guaranteed to
- NOT return null.
+ <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>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html#setStoredItems(java.util.List)">setStoredItems</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools">AbstractPagerTool</A></CODE></DL>
</DD>
<DD><DL>
-</DL>
+<DT><B>Parameters:</B><DD><CODE>items</CODE> - the <CODE>List</CODE> to be stored</DL>
</DD>
</DL>
<HR>
@@ -1127,7 +605,7 @@
protected abstract java.util.List <B>executeQuery</B>(java.lang.Object criteria)</PRE>
<DL>
<DD>Executes a query for the specified criteria.
-
+
<p>This method must be implemented! A simple
implementation might be something like:
<pre>
@@ -1138,9 +616,6 @@
</pre>
<P>
<DD><DL>
-</DL>
-</DD>
-<DD><DL>
<DT><B>Returns:</B><DD>a <CODE>List</CODE> of results for this query</DL>
</DD>
@@ -1156,9 +631,6 @@
session attributes.
<P>
<DD><DL>
-</DL>
-</DD>
-<DD><DL>
<DT><B>Returns:</B><DD>the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html" title="class in org.apache.velocity.tools.view.tools"><CODE>AbstractSearchTool.StoredResults</CODE></A> retrieved from memory</DL>
</DD>
@@ -1178,9 +650,6 @@
the former situation, you must also override getStoredResults().</p>
<P>
<DD><DL>
-</DL>
-</DD>
-<DD><DL>
<DT><B>Parameters:</B><DD><CODE>results</CODE> - the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.html" title="class in org.apache.velocity.tools.view.tools"><CODE>AbstractSearchTool.StoredResults</CODE></A> to be stored</DL>
</DD>
</DL>
@@ -1193,7 +662,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">
@@ -1214,10 +683,10 @@
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- PREV CLASS
+ <A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractPagerTool.html" title="class in org.apache.velocity.tools.view.tools"><B>PREV CLASS</B></A>
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/AbstractSearchTool.StoredResults.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>
+ <A HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/AbstractSearchTool.html" target="_top"><B>FRAMES</B></A>
<A HREF="AbstractSearchTool.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
@@ -1229,6 +698,7 @@
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
+
</FONT></TD>
</TR>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org