I'm basing the - prefix on what I read here, not tested yet
Code:
try {
SortSpecifier[] sorts = request.getSortBy();
if (sorts != null) {
setSort(request.getSortBy());
}
} catch (Exception ex) {
// request.getSortBy() causes java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.core.client.JavaScriptObject
// Workaround as this is a bug in SmartGWT 2.2
// http://forums.smartclient.com/showthread.php?t=8935&highlight=getSortBy%28%29
String sortAsString = request.getAttribute("sortBy");
if (sortAsString != null) {
for (String sort : sortAsString.split(",")) {
if (sort.startsWith("-")) {
addSort(sort.substring(1), false);
} else {
addSort(sort, true);
}
}
}
}
Leave a comment: