public void start(AcceptsOneWidget displayIn, EventBus eventBus) { this.display = displayIn; Receiver<EntityProxy> callback = new Receiver<EntityProxy>() { public void onSuccess(EntityProxy proxy) { if (display == null) { return; } view.setValue((AddressProxy) proxy); display.setWidget(view); } }; requests.find(proxyId).with().fire(callback); }
public void deleteClicked() { if (!view.confirm("Really delete this entry? You cannot undo this change.")) { return; } requests .addressRequest() .remove() .using(view.getValue()) .fire( new Receiver<Void>() { public void onSuccess(Void ignore) { if (display == null) { // This activity is dead return; } // Go back to the previous place. placeController.goTo(getBackButtonPlace()); } }); }