use of com.willshex.blogwt.client.api.page.event.DeletePageEventHandler.DeletePageFailure in project blogwt by billy1380.
the class PageController method deletePage.
/**
* @param page
*/
public void deletePage(Page page) {
final DeletePageRequest input = SessionController.get().setSession(ApiHelper.setAccessCode(new DeletePageRequest())).page(page);
ApiHelper.createPageClient().deletePage(input, new AsyncCallback<DeletePageResponse>() {
@Override
public void onSuccess(DeletePageResponse output) {
if (output.status == StatusType.StatusTypeSuccess) {
if (input.page != null) {
}
}
DefaultEventBus.get().fireEventFromSource(new DeletePageSuccess(input, output), PageController.this);
}
@Override
public void onFailure(Throwable caught) {
DefaultEventBus.get().fireEventFromSource(new DeletePageFailure(input, caught), PageController.this);
}
});
}
Aggregations