Reputation: 23
I'm new in wicket and I'm trying to create basic eshop, but I have a problem with pop-up label on Paging Navigator like "Go to page 2"...
I tried to remove or hide it, ussing: title=""
or script
$('a["title"]').on('mouseenter', function(e){
e.preventDefault();
});
but both solutions didn't work very well.
I'm ussing CustomPagingNavigator.java
public class CustomPagingNavigator extends PagingNavigator {
private static final long serialVersionUID = 1L;
public CustomPagingNavigator(final String id, final IPageable pageable) {
this(id, pageable, null);
}
public CustomPagingNavigator(final String id, final IPageable pageable, final IPagingLabelProvider labelProvider) {
super(id,pageable,labelProvider);
}
}
and CustomPagingNavigator.html
<html xmlns:wicket>
<body>
<wicket:panel>
<!-- First link -->
<a id="first" wicket:id="first">
<img id="arrow" src="left_arrow.png">
</a>
<!-- Previous Link -->
<a id="previous" wicket:id="prev">
</a>
<span id="navigation" title="" wicket:id="navigation">
<a wicket:id="pageLink" href="#">
<span wicket:id="pageNumber">5</span>
</a>
</span>
<!-- Next Link -->
<a id="next" wicket:id="next">
</a>
<!-- Last Link -->
<a id="last" wicket:id="last">
<img id="arrow" src="right_arrow.png">
</a>
</wicket:panel>
</body>
Should anyone have a simple solution of this problem?
Upvotes: 2
Views: 188
Reputation: 5681
Easiest solution is to put an empty mapping into one of your string resource files:
PagingNavigation.page=
Upvotes: 1
Reputation: 2511
have you tried to override the two methods that create the links removing attribute "title"? :
public class CustomPagingNavigator extends PagingNavigator {
public CustomPagingNavigator(String id, IPageable pageable) {
super(id, pageable);
}
public CustomPagingNavigator(String id, IPageable pageable,
IPagingLabelProvider labelProvider) {
super(id, pageable, labelProvider);
}
@Override
protected AbstractLink newPagingNavigationIncrementLink(String id, IPageable pageable,
int increment) {
AbstractLink link = super.newPagingNavigationIncrementLink(id, pageable, increment);
link.add(AttributeModifier.remove("title"));
return link;
}
@Override
protected AbstractLink newPagingNavigationLink(String id, IPageable pageable, int pageNumber) {
AbstractLink link = super.newPagingNavigationLink(id, pageable, pageNumber);
link.add(AttributeModifier.remove("title"));
return link;
}
}
Upvotes: 1