velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "deepak va" <deepa...@hotmail.com>
Subject AbstractPagerTool
Date Tue, 01 May 2007 20:24:04 GMT
Hi ,

Iam using the AbstractPagerTool for pagination.

I have written a Test class which extends AbstractPagerTool. Test class has 
the below code.
For every click on the pagination link a call is made to the database for 
fetching the records.
This is not the expected behaviour. We want to get the values once from the 
database and use it subsequently.

Please suggest how to achieve this.


*****************************************
public void setup(HttpServletRequest req)
	{
		        ParameterParser pp = new ParameterParser(req);
			setIndex(pp.getInt("index",0));
			setItemsPerPage(pp.getInt("show", 10));

			setSlipSize(10);

		List tradelist = getDataFromDatabase();
			setItems(tradelist);


	}


**************************************

Regards
Deepak

_________________________________________________________________
Sign in and get updated on all the action from Formula One 
http://content.msn.co.in/Sports/FormulaOne/Default


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message