Custom FILTER_COMPARATOR not called [message #1472389] |
Thu, 13 November 2014 16:03  |
Eclipse User |
|
|
|
Hi,
I'm trying to implement my own filtercomparator but it seems that is never gets called.
When I debug the Example "FilterRowGridExample" at line 94 the getIngnorecaseComparator() is called so it should be registered - shouldn't it?
........
// Configure custom comparator on the rating column
configRegistry.registerConfigAttribute(FilterRowConfigAttributes.FILTER_COMPARATOR,
getIngnorecaseComparator(),
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
..........
private static Comparator<?> getIngnorecaseComparator() {
return new Comparator<String>() {
public int compare(String o1, String o2) {
System.out.println(o1+"/"+o2);
return o1.compareToIgnoreCase(o2);
}
};
};
Now I would expect that the compare Method ist called everytime I enter a value in the filterrow for rating and press enter. But it isn't.
Even if I completly remove the lines for configRegistry.registerConfigAttribute(... the row gets filtered correctly. So it seems that the FilterComparator isn't used at all.
Is this a bug or do I simply missunderstand the concept?
How can I implement a CustomFilter for one of the rows?
Thanx
Thomas
PS: I'm using Nattable Version 1.2.0.201410270901, GlazedList 1.9.0, Java 1.8.0_25
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.20285 seconds