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