final SelectionResult<D> selectionResult = getSelectedData();
if (selectionResult.getSelectedData() != null && selectionResult.getSelectedData().isEmpty()) {
PNotificationManager.notify("Export failed, please select data to export", Notification.WARNING_MESSAGE);
return;
}
final Query query = createQuery(currentPage);
if (SelectionMode.FULL.equals(selectionMode)) {
query.setQueryMode(QueryMode.FULL_RESULT);
}
final ExportContext<D> exportContext = new ExportContext<D>(query, complexListConfiguration.getExportConfiguration().getExportableFields(), selectionResult);
exportContext.setExporter(exporter);
final Command<String> command = commandFactory.newExportCommand(ComplexListActivity.this, exportContext);