Search in sources :

Example 1 with DeletePageSuccess

use of com.willshex.blogwt.client.api.page.event.DeletePageEventHandler.DeletePageSuccess 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);
        }
    });
}
Also used : DeletePageRequest(com.willshex.blogwt.shared.api.page.call.DeletePageRequest) DeletePageFailure(com.willshex.blogwt.client.api.page.event.DeletePageEventHandler.DeletePageFailure) DeletePageResponse(com.willshex.blogwt.shared.api.page.call.DeletePageResponse) DeletePageSuccess(com.willshex.blogwt.client.api.page.event.DeletePageEventHandler.DeletePageSuccess)

Aggregations

DeletePageFailure (com.willshex.blogwt.client.api.page.event.DeletePageEventHandler.DeletePageFailure)1 DeletePageSuccess (com.willshex.blogwt.client.api.page.event.DeletePageEventHandler.DeletePageSuccess)1 DeletePageRequest (com.willshex.blogwt.shared.api.page.call.DeletePageRequest)1 DeletePageResponse (com.willshex.blogwt.shared.api.page.call.DeletePageResponse)1