mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 06:49:56 +00:00
The filter selection tables are now sorted
This commit is contained in:
1 parent
937465c40f
commit
e7e64feaac
1 file changed
+10
-1
+10
-1
@@ -3,6 +3,9 @@ package com.sap.sailing.gwt.ui.datamining.selection;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
@@ -103,7 +106,13 @@ class DimensionFilterSelectionProvider {
|
||||
@Override
|
||||
public void onSuccess(QueryResult<Set<Object>> result) {
|
||||
GroupKey contentKey = new GenericGroupKey<FunctionDTO>(dimension);
|
||||
Collection<?> content = result.getResults().get(contentKey);
|
||||
List<?> content = new ArrayList<Object>(result.getResults().get(contentKey));
|
||||
Collections.sort(content, new Comparator<Object>() {
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
return o1.toString().compareTo(o2.toString());
|
||||
}
|
||||
});
|
||||
selectionTable.setContent(content == null ? new ArrayList<>() : content);
|
||||
if (selectionToBeApplied != null) {
|
||||
selectionTable.setSelection(selectionToBeApplied);
|
||||
|
||||
Reference in new issue
Block a user