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