I've managed to get a collection (ArrayList) loaded into a displaytable.
The pagination works correctly. However, the entire collection is
reloaded
everytime the pagination is called (this is because the Struts action
that initially loads the collection is called over and over). How do I
get around this?
// taken from action class
ArrayList results = shortAgentDataAccess.getResults();
session.setAttribute("list", results);
The list returns 2049 records that are ALL loaded at startup.
The table is defined as follows:
<display:table name="sessionScope.list" export="true" id="row"
requestURI="/kw/agentSearchSubmit.do" pagesize="50">
I'd prefer to have it set at requestScope, but I'm using session for
testing. The requestURI is the Struts action
that is called repeatedly when the paging is activated.
The records paginate correctly - next goes to next, last goes to last
etc. HOWEVER, everytime the pagination is
called the entire list is loaded again. I know there must be a way to
get around this but have no idea how to
do it. I imagine I need a PaginatedList collection and I need to pass
parameters into it but there are no examples
(or at least any that I can find after Googling all morning)of how to do
this in a servlet or action class.
Thanks,
Bill
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user