Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding pagination

 
biswajit ray
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
is there anybody who can tell me what is pagination? all i want an example of pagination along with source code.
biswajit
 
Bimal Patel
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In simple terms, pagination is a concept of separating no. of records/rows into pages. Every page has equal or less then allowed rows. Like you have around 100 rows to be displayed, its better to break down that into no. of pages rather to display on a single page. The best example would be Java Ranch forum where the threads are paginated.
 
sushma sree
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the display tag. you can have a collection with all the data that you need to display and use this collection with the dsiplay tag and you can get all thge possible features like sorting the columns,applying styles and what not.

http://displaytag.sourceforge.net
 
ak pillai
author
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say that you want to display 100 products on your JSP. Displaying the whole 100 items in one page is not a good idea. So you divide those 100 records into 5 page actions with next and previous button. You read all the 100 records from the database and store them in a Java Collection, and show 25 items at a time on your JSP based on some use action.

Google for "JSP pagination" and you will get a number of articles.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic