This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes Page by Page Iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Page by Page Iterator" Watch "Page by Page Iterator" New topic
Author

Page by Page Iterator

Fintan Conway
Ranch Hand

Joined: Apr 03, 2002
Posts: 141
Hi All,
I have come across situations where we are returning thousands of records to a jsp page. This is taking too long to assemble the recordset. We want to return e.g. 50 records to the user. When they click on a button we would return the next 50 records and so on. I was extremely interested when I came across the page-by-page iterator pattern.
I delved into the links on Sun's web site, to find out how I could use this pattern to return the correct number of records to the JSP page (ordinary JSP - no EJB). As I delved further and further into the documentation I came to a full stop at the ListChunk object. I could not find anywhere the implementation which returns a ListChunk of records.
It SEEMS like this pattern is missing the very thing that I was looking for - a way to get a block of records into the ListChunk object.
Is this the way that the pattern is supposed to be? Is it really only window dressing on top of my actual requirements? Is there something that I have missed?
Any help would be appreciated,
Fintan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Page by Page Iterator