• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pagin

 
Sanjay Deshpande
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to display records on diff pages.
Say 100 records will be displayed in 10 pages.
Each page will have Next/Previous Button.
How can i do this ?
 
mark mathis
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanjay,
I have been using a CachedResultSet to handle my paging needs. I don't use it as a "paging" scroll, but instead as 25 records at a time. Here's a code sample:
<jsp:useBean id="crs"
class="sun.jdbc.rowset.CachedRowSet" scope="session">
for(int j=0; (j<25) && crs.next(); j++) {
crs.getString("myColumn");
}

You will find quite a bit of useful methods in the CachedResultSet for your particular implementation.
regards,
mark
 
Bhupinder Dhillon
Ranch Hand
Posts: 124
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!