I would like to implement pagination in Wicket

158 views Asked by At

Can someone provide the way to implement paging like << 1 2 3 ... 11 12 13 >> where 13 will be the last page.

I also tried with PagingNavigation and PagingNavigator but both provides different kind of paging.

1

There are 1 answers

1
Rob Audenaerde On

You need to build a custom component to do this. Looking at the source code of PagingNavigation and PagingNavigator should give you a few hints.

Your requirement is not entirly clear as well. For example, what should your paging look like when, say, page 5 is the active page? Of page 50 out of 100?

You will need to decide what to build. You will probably need two Repeaters (for example Loops) to build the begin and end series, and maybe a Loop to display the pages around the currently-selected page.