/** * {@inheritDoc} * * @see AbstractEntityListSelectorWizardStep#saveSelectedValue(AsyncCallback) */ @Override protected void saveSelectedValue(final AsyncCallback<Boolean> async) { // Backup the current resource type. final ResourceType previousResourceType = getData().getDestination().getType(); // Make sure the resource type is ATTACHMENT since this wizard step selects an attachment. getData().getDestination().setType(ResourceType.ATTACHMENT); super.saveSelectedValue( new AsyncCallback<Boolean>() { public void onFailure(Throwable caught) { // Restore previous resource type. getData().getDestination().setType(previousResourceType); async.onFailure(caught); } public void onSuccess(Boolean result) { async.onSuccess(result); } }); }
/** {@inheritDoc} */ @Override protected void fillList(List<Attachment> attachments, Attachment selectedAttachment) { super.fillList(attachments, selectedAttachment); getList().addItem(clearFloatsListItem); }