use of com.willshex.blogwt.client.api.user.event.GetUserDetailsEventHandler.GetUserDetailsFailure in project blogwt by billy1380.
the class UserController method getUser.
/**
* @param user
*/
public void getUser(User user) {
final GetUserDetailsRequest input = ApiHelper.setAccessCode(new GetUserDetailsRequest());
input.session = SessionController.get().sessionForApiCall();
input.user = user;
if (getUserRequest != null) {
getUserRequest.cancel();
}
getUserRequest = ApiHelper.createUserClient().getUserDetails(input, new AsyncCallback<GetUserDetailsResponse>() {
@Override
public void onSuccess(GetUserDetailsResponse output) {
getUserRequest = null;
if (output.status == StatusType.StatusTypeSuccess) {
}
DefaultEventBus.get().fireEventFromSource(new GetUserDetailsSuccess(input, output), UserController.this);
}
@Override
public void onFailure(Throwable caught) {
DefaultEventBus.get().fireEventFromSource(new GetUserDetailsFailure(input, caught), UserController.this);
}
});
}
Aggregations