mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 10:09:42 +00:00
Fixed a bug of the selection tables update mechanism
This commit is contained in:
1 parent
66efc11e16
commit
9f1d7ffaf6
2 files changed
+8
-5
No files matched your search
+1
-1
@@ -56,7 +56,7 @@ public class DataMiningEntryPoint extends AbstractEntryPoint {
|
||||
dockPanel.add(queryDefinitionProviderWithControls.getEntryWidget());
|
||||
|
||||
ResultsPresenter<Number> resultsPresenter = new ResultsChart(stringMessages);
|
||||
if (GwtHttpRequestUtils.getBooleanParameter("benchmark", true)) {
|
||||
if (GwtHttpRequestUtils.getBooleanParameter("benchmark", false)) {
|
||||
BenchmarkResultsPanel benchmarkResultsPanel = new BenchmarkResultsPanel(stringMessages, dataMiningService, this, queryDefinitionProviderWithControls);
|
||||
splitPanel.addSouth(benchmarkResultsPanel, 500);
|
||||
} else {
|
||||
|
||||
+7
-4
@@ -32,7 +32,6 @@ import com.sap.sailing.gwt.ui.datamining.StatisticChangedListener;
|
||||
import com.sap.sailing.gwt.ui.datamining.StatisticProvider;
|
||||
import com.sap.sailing.gwt.ui.datamining.settings.RefreshingSelectionTablesSettings;
|
||||
import com.sap.sailing.gwt.ui.datamining.settings.RefreshingSelectionTablesSettingsDialogComponent;
|
||||
import com.sap.sse.datamining.shared.GroupKey;
|
||||
import com.sap.sse.datamining.shared.QueryDefinition;
|
||||
import com.sap.sse.datamining.shared.QueryResult;
|
||||
import com.sap.sse.datamining.shared.components.AggregatorType;
|
||||
@@ -184,15 +183,19 @@ public class RefreshingSelectionTablesPanel implements SelectionProvider<Refresh
|
||||
@Override
|
||||
public void onSuccess(QueryResult<Set<Object>> result) {
|
||||
boolean tableContentChanged = false;
|
||||
for (Entry<GroupKey, Set<Object>> resultEntry : result.getResults().entrySet()) {
|
||||
List<?> sortedDimensionValues = new ArrayList<>(resultEntry.getValue());
|
||||
for (GenericGroupKey<FunctionDTO> dimensionAsKey : tablesMappedByDimensionAsKeys.keySet()) {
|
||||
List<?> sortedDimensionValues = new ArrayList<>();
|
||||
if (result.getResults().containsKey(dimensionAsKey)) {
|
||||
sortedDimensionValues = new ArrayList<>(result.getResults().get(dimensionAsKey));
|
||||
Collections.sort(sortedDimensionValues, new Comparator<Object>() {
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
return o1.toString().compareTo(o2.toString());
|
||||
}
|
||||
});
|
||||
boolean currentTableContentChanged = tablesMappedByDimensionAsKeys.get(resultEntry.getKey()).updateContent(sortedDimensionValues);
|
||||
}
|
||||
|
||||
boolean currentTableContentChanged = tablesMappedByDimensionAsKeys.get(dimensionAsKey).updateContent(sortedDimensionValues);
|
||||
if (!tableContentChanged) {
|
||||
tableContentChanged = currentTableContentChanged;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user