I am in web application Java programmer. I am working on paging in catalog page.
my requirement is:
if our current page 5 and total page 9 than paging:
example: 1....4 5 6 ......9
there some point to doing logic:
1. Always First page and last page is seen. no repeatation.
2. there is no previous button and next button.
3. If there is current page is going on ,than it's previous page number and next page number must be come.
4. If there second last page number is seen than it will be come with last page number.
like : if current page is 7 and total page is 9 :
5. If there second page number is seen than it will be come with first number.
like: if current page = 2 than
if current page is 3 than
So give me logic and solution.