@Override public void edit() { isEditMode = true; storyService.getStorySummary( storySummary.getStoryId(), new ResponseHandlerLoader<DatumResponse<StorySummary>>() { @Override public void handleSuccess(DatumResponse<StorySummary> result) { doEdit(result.getDatum()); } }); }
private void fetchStorySummary(final AsyncCallback<DatumResponse<StorySummary>> callback) { storyService.getStorySummary( storySummary.getStoryId(), new ResponseHandlerLoader<DatumResponse<StorySummary>>() { @Override public void handleSuccess(DatumResponse<StorySummary> result) { storySummary = result.getDatum(); onStorySummaryFetched(); if (callback != null) { callback.onSuccess(result); } } @Override public void onFailure(Throwable e) { super.onFailure(e); if (callback != null) { callback.onFailure(e); } } }); }