Wicket Custom Paging Navigator
21 Mar 2010Wicket Built-in Components
Wicket provides lot of useful components out of the box. Sometimes we would like to change the appearance(aka markup) of the built-in components. It is very easy to do.
Original Markup
Each component has a markup file associated with it. We will take the PagingNavigator as an example. It is associated with the markup file PagingNavigator.html. I got the markup from 1.
Extend the Component
First we need to extend the Component, in our case it is PagingNavigator.
Customize the Markup
Create a markup file for the component(CustomPagingNavigator.html) and
copy the original markup. The only restriction is, we should not
change the wicket:id
and the hierarchy of the wicket:id
. I don’t
like the < and > symbols. So i am going to change it and i like
to add |
between the links.
I have made small changes only. But you can go on and make further changes like showing images instead of first, last etc.