Even more Fixes over dashboard's sorting
This commit is contained in:
parent
6de12fd0e8
commit
1a821179db
|
@ -356,6 +356,9 @@ public class DashBoardManager {
|
|||
try {
|
||||
String order = tableRequest.getOrderings().getFields().get(0).toCharArray()[0] + "";
|
||||
String field = tableRequest.getOrderings().getFields().get(0).substring(1);
|
||||
if (field.contains(":") && field.contains("|")) {
|
||||
field = field.substring(field.lastIndexOf(":") + 1, field.indexOf("|"));
|
||||
}
|
||||
field = field.equals("label") ? "title" : field;
|
||||
field = field.substring(0, 1).toUpperCase() + field.substring(1);
|
||||
return (order.equals("+") ? 1 : -1 ) * ((Comparable)o1.getClass().getMethod("get" + field).invoke(o1)).compareTo(o2.getClass().getMethod("get" + field).invoke(o2));
|
||||
|
|
Loading…
Reference in New Issue