if (!saved && view.getCurrentTask() != null) {
if (DcSwingUtilities.displayQuestion("msgNotSaved"))
view.save(false);
}
PollerTask poller = new PollerTask(this, DcResources.getText("lblFiltering"));
poller.start();
try {
sleep(1000);
} catch (Exception e) {}
view.undoChanges();
parent.clear();
DataFilter df = getDataFilter();
DataFilters.setCurrent(module.getIndex(), df);
// do not query here if the grouping pane is enabled; the grouping pane will
// execute the query by itself..
Map<String, Integer> keys =
module.getSearchView().getGroupingPane() != null &&
module.getSearchView().getGroupingPane().isEnabled() ?
new HashMap<String, Integer>() : DataManager.getKeys(df);
parent.setStatus(DcResources.getText("msgSearchHasBeenExecuted"));
parent.add(keys);
DataFilters.setCurrent(module.getIndex(), df);
DataCrow.mainFrame.setSelectedTab(0);
try {
poller.finished(true);
} catch (Exception e) {
logger.error(e, e);
DcSwingUtilities.displayErrorMessage(Utilities.isEmpty(e.getMessage()) ? e.toString() : e.getMessage());
}
}