Application.getDataService().getPositions(device, from, to, new BaseAsyncCallback<List<Position>>() {
@Override
public void onSuccess(List<Position> result) {
positionStore.clear();
if (result.isEmpty()) {
new AlertMessageBox("Error", "No results found for selected period").show();
} else {
positionStore.addAll(result);
}
}
});
} else {
new AlertMessageBox("Error", "All form fields must be filled first").show();
}
}