Search in sources :

Example 1 with UserEditedEvent

use of org.kie.workbench.common.screens.social.hp.client.homepage.events.UserEditedEvent in project kie-wb-common by kiegroup.

the class UserHomePageSidePresenter method createLoggedUserActionLink.

private void createLoggedUserActionLink(final SocialUser socialUser, final Button followUnfollow) {
    followUnfollow.setText(Constants.INSTANCE.Edit());
    followUnfollow.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            editUserForm.show(socialUser, new ParameterizedCommand<SocialUser>() {

                @Override
                public void execute(SocialUser socialUser) {
                    socialUserService.call().update(socialUser);
                    refreshPage(socialUser.getUserName());
                    userEditedEvent.fire(new UserEditedEvent(socialUser.getUserName()));
                }
            });
        }
    });
}
Also used : UserEditedEvent(org.kie.workbench.common.screens.social.hp.client.homepage.events.UserEditedEvent) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) SocialUser(org.ext.uberfire.social.activities.model.SocialUser) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand)

Aggregations

ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)1 SocialUser (org.ext.uberfire.social.activities.model.SocialUser)1 UserEditedEvent (org.kie.workbench.common.screens.social.hp.client.homepage.events.UserEditedEvent)1 ParameterizedCommand (org.uberfire.mvp.ParameterizedCommand)1