use of org.activityinfo.client.dispatch.monitor.MaskingAsyncMonitor in project activityinfo by bedatadriven.
the class PrintDataEntryForm method print.
public void print(final int activityId) {
setVisible(true);
dispatcher.execute(new GetSchema(), new MaskingAsyncMonitor(this, I18N.CONSTANTS.loading()), new AsyncCallback<SchemaDTO>() {
@Override
public void onFailure(Throwable caught) {
showError(caught);
}
@Override
public void onSuccess(SchemaDTO result) {
renderForm(activityId, result);
}
});
}
use of org.activityinfo.client.dispatch.monitor.MaskingAsyncMonitor in project activityinfo by bedatadriven.
the class EmailDialog method onButtonPressed.
@Override
protected void onButtonPressed(Button button) {
if (button.getItemId().equals(OK)) {
final UpdateReportSubscription update = new UpdateReportSubscription();
update.setReportId(reportMetadata.getId());
if (weekly.getValue()) {
update.setEmailDelivery(EmailDelivery.WEEKLY);
update.setEmailDay(dayOfWeek.getMappedValue());
} else if (monthly.getValue()) {
update.setEmailDelivery(EmailDelivery.MONTHLY);
update.setEmailDay(dayOfMonth.getMappedValue());
} else {
update.setEmailDelivery(EmailDelivery.NONE);
}
dispatcher.execute(update, new MaskingAsyncMonitor(this, I18N.CONSTANTS.saving()), new AsyncCallback<VoidResult>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(VoidResult result) {
hide();
reportMetadata.setEmailDelivery(update.getEmailDelivery());
reportMetadata.setDay(update.getEmailDay());
callback.onUpdated();
}
});
} else if (button.getItemId().equals(CANCEL)) {
hide();
}
}
use of org.activityinfo.client.dispatch.monitor.MaskingAsyncMonitor in project activityinfo by bedatadriven.
the class ShareReportDialog method show.
public void show(ReportMetadataDTO metadata) {
super.show();
BatchCommand batch = new BatchCommand();
batch.add(new GetReportModel(metadata.getId()));
batch.add(new GetSchema());
batch.add(new GetReportVisibility(metadata.getId()));
dispatcher.execute(batch, new MaskingAsyncMonitor(grid, I18N.CONSTANTS.loading()), new AsyncCallback<BatchResult>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(BatchResult batch) {
currentReport = ((ReportDTO) batch.getResult(0)).getReport();
populateGrid((SchemaDTO) batch.getResult(1), (ReportVisibilityResult) batch.getResult(2));
}
});
}
use of org.activityinfo.client.dispatch.monitor.MaskingAsyncMonitor in project activityinfo by bedatadriven.
the class ShareReportDialog method show.
public void show(final Report report) {
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 GetSchema());
batch.add(new GetReportVisibility(currentReport.getId()));
dispatcher.execute(batch, new MaskingAsyncMonitor(grid, I18N.CONSTANTS.loading()), new AsyncCallback<BatchResult>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(BatchResult batch) {
populateGrid((SchemaDTO) batch.getResult(0), (ReportVisibilityResult) batch.getResult(1));
}
});
}
use of org.activityinfo.client.dispatch.monitor.MaskingAsyncMonitor in project activityinfo by bedatadriven.
the class SearchResultsPage method initializeComponent.
private void initializeComponent() {
setHeaderVisible(false);
setLayout(new BorderLayout());
SearchResources.INSTANCE.searchStyles().ensureInjected();
loadingMonitor = new MaskingAsyncMonitor(this, I18N.CONSTANTS.busySearching());
}
Aggregations