Reputation: 3860
I would like to modify the text and Tooltip of the first,last,next,prev buttons in Wicket.
By default the text of the buttons is displayed with "<<" "<" ">" ">>"
I have placed icons using CSS in the buttons. But I can't find a way to remove the button's text (those arrow text chars)
Also the buttons have a title. This title is set in the PagingNavigator class. It does not seem to me like there is a way to modify the Tooltip / title of the buttons. We don't use property files, I would like to set a custom Tooltip using a setter method.
Is there an easy way to achieve that?
Thanks
Sebastian
Upvotes: 1
Views: 354
Reputation: 1266
A quick and easy way is to create your own subclass of PagingNavigator
, e.g. MyPagingNavigator
:
public class MyPagingNavigator extends PagingNavigator {
public MyPagingNavigator(final String id, final IPageable pageable) {
super(id, pageable);
}
}
No other code changes are necessary.
You can then copy the original markup into your own MyPagingNavigator.html
file and customize the text and anything else (as long as you leave the component hierarchy intact.
Upvotes: 1