When change language, in an action in the same page catch old language, that 
have it before, with method "Locale.instance().getLanguage()"

I change language with localeSelector :


  |                     <h:form id="selectLanguage">                    
  |                         <h:selectOneMenu value="#{localeSelector.language}">
  |                             <f:selectItems 
value="#{localeSelector.supportedLocales}"/>                             
  |                         </h:selectOneMenu>
  |                         <h:commandButton action="#{localeSelector.select}" 
value="#{messages['ChangeLanguage']}"/>                    
  |                     </h:form>
  | 

After in action I have : 


  |         String language = Locale.instance().getLanguage();
  | 

When change language the action is executed  too.

I explain :

1º 
View : Default "es" -> selectOneMenu = "español", properties = messages_es
Action : Locale.instance().getLanguage() = "es"

2º 
View: Change "en" -> selectOneMenu = "English", properties = messages_en
Action: Locale.instance().getLanguage() = "es"

3º 
View: Change "es" -> selectOneMenu = "español", properties = messages_es 
Action: Locale.instance().getLanguage() = "en"

4º 
View: Change "en" -> selectOneMenu =  "English", properties = messages_en
Action: Locale.instance().getLanguage() = "es"
.
.
.
.

How change language before enter in my action? 

Or any other idea?

Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995796#3995796

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995796

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to