Gary VanMatre on 23/01/06 20:11, wrote:
We have a situation where we require to paginate our result list (which is quite huge, around 1000+ records). We found few tags like DisplayTags from sourceforge.net but the current version does not support batch lists (i.e. retrieving the list in batches based on the page the user is in, instead of retrieving all in once). Is there a tag in Struts/JSTL that would help display huge lists. Any help is appreciated.

None that I'm aware of:( Although I keep meaning to work on one. Ajax would really be nice for this actually. You could go to the server to get your next display and it would repopulate your display without the whole page refreshing.

That would be slick but you would still have the problem of deciding how
to batch up your results without actually retrieving the full set.  You still 
need
to determine how many rows you want to display and how many pages. Are you thinking of using something like a keyset cursor? Something similar could be implemented using the standard DAO/VO pattern.

I've heard this described as ghost objects. The first data retrieval only returns the primary keys populating ghost objects. The set of keys are used to retrieve the details/rest of the object per page. Your initial inquiry returns the full set of keys matching the criteria.

I implemented pagination with batched retrieval using Hibernate, which takes a couple of parameters on its fetch methods, maxCount and firstRecord.

It's fairly easy except the logic at the front-end was tricky when trying to implement backwards and forward buttons and setting the new firstRecord parameter to store on the jsp for the next submit.



Adam

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

Reply via email to