}
uiUserInfo.getChild(UIUserProfileInputSet.class).save(service, uiUserInfo.getUserName(), false);
if (uiUserInfo.getUserName().equals(event.getRequestContext().getRemoteUser())) {
UserProfileHandler hanlder = service.getUserProfileHandler();
UserProfile userProfile = hanlder.findUserProfileByName(event.getRequestContext().getRemoteUser());
String language = userProfile.getAttribute(Constants.USER_LANGUAGE);
UIPortalApplication uiApp = Util.getUIPortalApplication();
if (language == null || language.trim().length() < 1)
return;
LocaleConfigService localeConfigService = event.getSource().getApplicationComponent(LocaleConfigService.class);
LocaleConfig localeConfig = localeConfigService.getLocaleConfig(language);
if (localeConfig == null)
localeConfig = localeConfigService.getDefaultLocaleConfig();
PortalRequestContext prqCtx = Util.getPortalRequestContext();
prqCtx.setLocale(localeConfig.getLocale());
// GTNPORTAL-3244: A workaround to update localization in the popup messages
ResourceBundle bundle = Util.getPortalRequestContext().getApplication().getResourceBundle(localeConfig.getLocale());
for(AbstractApplicationMessage message : uiApp.getUIPopupMessages().getErrors()) {
message.setResourceBundle(bundle);
}
for(AbstractApplicationMessage message : uiApp.getUIPopupMessages().getWarnings()) {
message.setResourceBundle(bundle);
}
for(AbstractApplicationMessage message : uiApp.getUIPopupMessages().getInfos()) {
message.setResourceBundle(bundle);
}
Util.getPortalRequestContext().addUIComponentToUpdateByAjax(
uiApp.findFirstComponentOfType(UIWorkingWorkspace.class));
Util.getPortalRequestContext().ignoreAJAXUpdateOnPortlets(true);
}
UIAccountEditInputSet accountInput = uiUserInfo.getChild(UIAccountEditInputSet.class);
UIUserProfileInputSet userProfile = uiUserInfo.getChild(UIUserProfileInputSet.class);
uiUserInfo.setRenderSibling(UIListUsers.class);
accountInput.reset();
userProfile.reset();
event.getRequestContext().setProcessRender(true);
}