I've always used displaytag for paginated results. It is really easy to use
(and flexible at the same time)

musachy

On 6/21/07, Jeromy Evans <[EMAIL PROTECTED]> wrote:

Skip Hollowell wrote:
> So now my question is ... how?  I have a list of 5000 records.  I want
> to initially show them a 100 of these records, with a nice Prev / Next
> feature.
> 1.  Where / how do I safely store this list for this user?  Obviously
> it needs to be saved somewhere so it is not lost once the request is
> done.  Is this something that should be dropped into the session?  Or
> is there a Struts way of doing things like this?
>
As always, it depends.  You need to consider how big the records
actually are, how many concurrent users you have and how interactive you
want the user's experience to be.

Here's some options:
1. store your results in the http session.  This takes no effort but
won't scale very well.
2. Look at the paging implementation provided by displaytag.  The
default behaviour loads all data and pages through it for you.
http://displaytag.sourceforge.net/11/index.html
3. pass all the results to the client in one request.  Use a javascript
widget to page through the results entirely on the client.  This would
be great if its not too much data to download
4. if you're using an ORM framework like hibernate or toplink, enabling
an object cache or query cache may achieve the effect you desire without
having to write any custom code (WRT hitting the database once and then
not needing to access it again for each page)


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




--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Reply via email to