Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic next/previous link

 
labanya roy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose depending upon the number of records a page will have next /previous link .Say max 25 per page.
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello labanya roy,
can u be describe ur quetion in more detail.
r u trying to implement paging in ur jsp page. or u just want to display next / prev button?
 
labanya roy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prakash Dwivedi:
Hello labanya roy,
can u be describe ur quetion in more detail.
r u trying to implement paging in ur jsp page. or u just want to display next / prev button?
 
labanya roy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the previous reply.yes paging thru java
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is simple implementation
Create a footer jsp, this jsp will three inputs
1. total number of pages
2. current page number as input.
3. target url
In footer jsp, you can run a for loop, to print page numbers, all being hyper links to target url, current page number will not be hyperlink.
This jsp can be used whereever u want to provide paging functionality.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic