Hi!
I had absolutely the same strange problem. Sorting of table works only after some filtering.
The reason of my problem was a bug in my java code.
The most strange thing is it was working good until upgrade to 2.1 -> 2.2.1. since sorting was made on client side.
So I believe that your problem could have the similar reason.
About the bug - my getter every time search in data base (JPA) apparently it is not good idea
Wrong code
Code: Select all
public List<Device> getItems() {
if (pattern.equalsIgnoreCase("")) {
retun new ArrayList<Device>();
}
List<Device> searchResult = deviceSearch(param, pattern);
if (exclude != null){
searchResult.removeAll(exclude);
}
return searchResult;
}
---------------------------------
Right version :
Code: Select all
private List<Device> searchResult = null;
public List<Device> getItems() {
if (searchResult != null){
return searchResult;
}
if (pattern.equalsIgnoreCase("")) {
searchResult = new ArrayList<Device>();
return searchResult;
}
searchResult = deviceSearch(param, pattern);
if (exclude != null){
searchResult.removeAll(exclude);
}
return searchResult;
}
I hope it will help you.
Monk.