private void deleteNote(String path) { service.deleteNote( path, new AsyncCallback() { public void onFailure(Throwable throwable) { Window.alert("Failed to delete note: " + throwable.getMessage()); } public void onSuccess(Object o) { getNotes(); } }); }