Search in sources :

Example 1 with ChangeUserDetailsSuccess

use of com.willshex.blogwt.client.api.user.event.ChangeUserDetailsEventHandler.ChangeUserDetailsSuccess in project blogwt by billy1380.

the class UserController method changeUserDetails.

/**
 * @param user
 */
public void changeUserDetails(User user) {
    final ChangeUserDetailsRequest input = ApiHelper.setAccessCode(new ChangeUserDetailsRequest());
    input.session = SessionController.get().sessionForApiCall();
    input.user = user;
    ApiHelper.createUserClient().changeUserDetails(input, new AsyncCallback<ChangeUserDetailsResponse>() {

        @Override
        public void onSuccess(ChangeUserDetailsResponse output) {
            if (output.status == StatusType.StatusTypeSuccess) {
            }
            DefaultEventBus.get().fireEventFromSource(new ChangeUserDetailsSuccess(input, output), UserController.this);
        }

        @Override
        public void onFailure(Throwable caught) {
            DefaultEventBus.get().fireEventFromSource(new ChangeUserDetailsFailure(input, caught), UserController.this);
        }
    });
}
Also used : ChangeUserDetailsRequest(com.willshex.blogwt.shared.api.user.call.ChangeUserDetailsRequest) ChangeUserDetailsSuccess(com.willshex.blogwt.client.api.user.event.ChangeUserDetailsEventHandler.ChangeUserDetailsSuccess) ChangeUserDetailsFailure(com.willshex.blogwt.client.api.user.event.ChangeUserDetailsEventHandler.ChangeUserDetailsFailure) ChangeUserDetailsResponse(com.willshex.blogwt.shared.api.user.call.ChangeUserDetailsResponse)

Aggregations

ChangeUserDetailsFailure (com.willshex.blogwt.client.api.user.event.ChangeUserDetailsEventHandler.ChangeUserDetailsFailure)1 ChangeUserDetailsSuccess (com.willshex.blogwt.client.api.user.event.ChangeUserDetailsEventHandler.ChangeUserDetailsSuccess)1 ChangeUserDetailsRequest (com.willshex.blogwt.shared.api.user.call.ChangeUserDetailsRequest)1 ChangeUserDetailsResponse (com.willshex.blogwt.shared.api.user.call.ChangeUserDetailsResponse)1