Search in sources :

Example 1 with GetUserProfile

use of org.activityinfo.shared.command.GetUserProfile in project activityinfo by bedatadriven.

the class UserProfilePage method bindProfile.

private void bindProfile() {
    userProfile = new UserProfileDTO();
    AuthenticatedUser user = new ClientSideAuthProvider().get();
    dispatcher.execute(new GetUserProfile(user.getUserId()), new AsyncCallback<UserProfileDTO>() {

        @Override
        public void onFailure(Throwable caught) {
            Log.error("error binding profile", caught);
            MessageBox.alert(I18N.CONSTANTS.serverError(), caught.getMessage(), null);
        }

        @Override
        public void onSuccess(UserProfileDTO userProfileDTO) {
            userProfile = userProfileDTO;
            binding.bind(userProfile);
            UserProfilePage.this.show();
        }
    });
}
Also used : ClientSideAuthProvider(org.activityinfo.client.authentication.ClientSideAuthProvider) GetUserProfile(org.activityinfo.shared.command.GetUserProfile) UserProfileDTO(org.activityinfo.shared.dto.UserProfileDTO) AuthenticatedUser(org.activityinfo.shared.auth.AuthenticatedUser)

Aggregations

ClientSideAuthProvider (org.activityinfo.client.authentication.ClientSideAuthProvider)1 AuthenticatedUser (org.activityinfo.shared.auth.AuthenticatedUser)1 GetUserProfile (org.activityinfo.shared.command.GetUserProfile)1 UserProfileDTO (org.activityinfo.shared.dto.UserProfileDTO)1