• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

regarding pagination

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic