Search in sources :

Example 1 with DeleteSiteAttachment

use of org.activityinfo.legacy.shared.command.DeleteSiteAttachment in project activityinfo by bedatadriven.

the class AttachmentsPresenter method onDelete.

public void onDelete() {
    DeleteSiteAttachment attachment = new DeleteSiteAttachment();
    attachment.setBlobId(view.getSelectedItem());
    dispatcher.execute(attachment, new AsyncCallback<VoidResult>() {

        @Override
        public void onFailure(Throwable caught) {
        // callback.onFailure(caught);
        }

        @Override
        public void onSuccess(VoidResult result) {
            view.setActionEnabled(UIActions.DELETE, false);
            view.setAttachmentStore(currentSite.getId());
        }
    });
}
Also used : DeleteSiteAttachment(org.activityinfo.legacy.shared.command.DeleteSiteAttachment) VoidResult(org.activityinfo.legacy.shared.command.result.VoidResult)

Aggregations

DeleteSiteAttachment (org.activityinfo.legacy.shared.command.DeleteSiteAttachment)1 VoidResult (org.activityinfo.legacy.shared.command.result.VoidResult)1