aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Page wise display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Page wise display" Watch "Page wise display" New topic
Author

Page wise display

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
Hi all,
I had a doubt what bean should I use when I want to populate data page wise.
Maximum in one page he can see 10 records while pressing on next page he gets another 10 record
How should I populate the next 10 records where my records in a table is more than a lakh and
performance is an issue.
Regards,
aakash
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
There is a Design Pattern aimed at this very problem. It is from the Core J2EE Patterns book and is called the Value List Handler Pattern. Check it out here: Value List Handler.
[ January 15, 2003: Message edited by: Chris Mathews ]
rastin purr
Ranch Hand

Joined: Jul 20, 2002
Posts: 73
Which is a better way, to get say all the records (say 100 of them) and returned as an iteration. Display 10 of them and when next is clicked, display the next of them from the iterator returned. Or, get 10 of them (return as iterator). When next is clicked, do another search and get the next 10 and return as iterator instance to be displayed.
In the first the overhead is huge but for subsequent list it is easier. Am i correct so far? please suggest.
ras
Thomas Taeger
Ranch Hand

Joined: Dec 16, 2002
Posts: 309
Hi Rastin,
I asked the customer how many rows we had to expect and the amount of data per row.
He said "unlimited".
So I implemented the second way you propose.
Thomas.


www.classic-and-class.com - www.evalulearn.com
Interfaces are the glue of OO.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page wise display