on 03-04-2008 1:17 PM
Hello everybody,
I am using the generic filter class and it is working well.
But I have the following problem:
For instance I would like to filter my table with the value "test", and suppose there are
other entries which have "test" as a subtring. Everytime I am filtering for "test", I get
all entries which are containing the "test" string. Is there a way to filter for a exact string?
I have tried to use the prefix "=", but it seems that I am getting the same result like without the "=".
Can anybody help me with this issue?
Best regards
Joachim
Hi,
Search for the if (o1 instanceof String && o2 instanceof String) in TableFilter.java and replace the if block with the below code.
if (o1 instanceof String && o2 instanceof String) {
Collator collate = Collator.getInstance(WDResourceHandler
.getCurrentSessionLocale());
if (o1.toString().toUpperCase( WDResourceHandler.getCurrentSessionLocale()) .equalsIgnoreCase(o2.toString().toUpperCase(WDResourceHandler.getCurrentSessionLocale()))) {
return o1.toString().toUpperCase(WDResourceHandler.getCurrentSessionLocale()).indexOf(
o2.toString().toUpperCase(WDResourceHandler .getCurrentSessionLocale()));
} else {
return -1;
}
}
Regards,
Sudhir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.