Prashanth M H wrote: > Hi All, > > I'm using the DisplayTag to display the list in the jsp. I'm setting > the list to SessionScope in my class and in the displaytag properties > file, i've put export.amount = list. > > I'm able to display the entire list in the jsp with pagination, but > whenever I click on the 2nd page hyperlink it is querying the > database again and displaying the next set of records. > > Since the list is set in the sessionScope and export.amount = list is > configured, can't the database hit on every click be avoided???
Yes. > > If possible, how to do it??? > You need to write the code that is responsible for querying the database to be smart enough to know when the requested data is already in the session scope and then not go back to the database again but use the existing data. When you click the DisplayTag pagination links all that is happening is the current page (or the requestURI attribute) is being called and that bit is your code; DisplayTag knows nothing about databases or where your data comes from. PS The export.amount property is only used when DisplayTag is exporting the data to csv, xls or other file formats; it has no effect on the data displayed in the browser. Ed! ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user