0

I'd like to modify the pagination behavior of displayTag.

Let me explain how it will work.

First, show all first 20 pages in the pagination.

< 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 >

The right arrow above will not go to page 21 (it's not next button) but will show the next set of 20 pages.

< 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40 >

In summary, the left and right arrow will show next/previous 20 pages, not just next/previous page.

Is it possible to modify something like this?

Atthapon Junpun-eak
  • 540
  • 2
  • 11
  • 23

1 Answers1

1

You can make your own pagination and then to use it like

<display:setProperty name="paging.banner.full">
   ${yourOwnPagination}
</display:setProperty>

Maybe you will need to change some other parameters paging.banner... as well.

Alex
  • 11,451
  • 6
  • 37
  • 52
  • Thanks for your response, Alexey. From my understanding, this is not different from modifying displayTag.properties, right? However, what I really need to do is to modify the behavior of the pagination, not its look&feel. Any ideas? – Atthapon Junpun-eak Mar 12 '13 at 04:18
  • ${yourOwnPagination} can be different from standard behaviour and you can put here whatever you want e.g. custom generated links (pagination). So you can build it yourself what to output here. – Alex Mar 12 '13 at 04:28
  • Do you have any example or where can I get some example about this? – Atthapon Junpun-eak Mar 12 '13 at 06:49
  • You can try to put something into request.setAttribute("yourOwnPagination", yourPagination) where yourPagination is your implementation of pagination e.g. returned html string with page numbers and links. Don't know where to find example. – Alex Mar 12 '13 at 12:30
  • did you find any code example for this? I want something similar. – Panos Apr 24 '13 at 09:54