use of org.activityinfo.legacy.shared.command.result.IndicatorResult in project activityinfo by bedatadriven.
the class ShareReportDialog method show.
public void show(final Report report) {
if (report.getIndicators().isEmpty()) {
MessageBox.alert(I18N.CONSTANTS.alert(), I18N.CONSTANTS.unableToShareReport(), null);
return;
}
super.show();
this.currentReport = report;
// we need to combine the databases which already have visiblity with
// those that could potentially be added
BatchCommand batch = new BatchCommand();
batch.add(new GetIndicators(currentReport.getIndicators()));
batch.add(new GetReportVisibility(currentReport.getId()));
dispatcher.execute(batch, new MaskingAsyncMonitor(grid, I18N.CONSTANTS.loading()), new SuccessCallback<BatchResult>() {
@Override
public void onSuccess(BatchResult batch) {
populateGrid((IndicatorResult) batch.getResult(0), (ReportVisibilityResult) batch.getResult(1));
}
});
}
Aggregations