Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination style

 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want a javascript code for pagination (or) navigate the records which is retrived from the database

my target shown below:

< << 1|2|3|4|5 >> >

Please help me regarding this

venkat
 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to use rownum in your query that will fetch records like this
rownum>=lowerlimit and rownum<=upperlimit

just calculate lowerlimit = (pageno-1)*no_of_records_per_page
and upperlimit = pageno * no of records_per_page;
where no_of_records_per page is the number of recoreds you wish to show on a page.

send selected pageno <1|2|3> to action.

See if it helps .

Thanks
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also want to read http://faq.javaranch.com/java/PaginationOrPaging
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic