Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-3228: Change Language Selector changes to default language …
Browse files Browse the repository at this point in the history
…on save
  • Loading branch information
haint authored and trongtt committed Sep 20, 2013
1 parent 8049666 commit 08ce895
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -155,16 +155,14 @@ public void execute(Event<UILanguageSelector> event) throws Exception {
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.createEvent("Close", Phase.DECODE, rContext).broadcast();

if (language == null || language.trim().equals(prqCtx.getLocale().getLanguage())) {
if (language == null || language.isEmpty() || language.trim().equals(prqCtx.getLocale().getLanguage())) {
// LocalizationLifecycle will save userProfile if locale is changed
// We need to handle case : locale is not changed, but user's locale setting has not been initialized
if (prqCtx.getRemoteUser() != null) {
saveLocaleToUserProfile(prqCtx);
}
return;
}
// if(!uiPortal.isModifiable()) return;

LocaleConfigService localeConfigService = event.getSource().getApplicationComponent(LocaleConfigService.class);
LocaleConfig localeConfig = localeConfigService.getLocaleConfig(language);
if (localeConfig == null)
Expand Down

0 comments on commit 08ce895

Please sign in to comment.