DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26895>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26895

Faces locale is not set to the struts locale

           Summary: Faces locale is not set to the struts locale
           Product: Struts
           Version: Nightly Build
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Struts-Faces Library
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I'm trying to get my app to change languages based on user selection.

I started with the stuts-faces example app adding the following to the very 
top of index.jsp.

<%
request.getSession(true).setAttribute(Globals.LOCALE_KEY, new Locale("ru"));
%>

Everything displayed in Russian on the index.jsp page. When I navigate to the 
login page everything reverts to English. To keep the language Russian I had 
to add the following to the top of login.jsp.

<%
Locale locale = (Locale) request.getSession(true).getAttribute
(Globals.LOCALE_KEY);
FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
%>

It seems to me that setting the Faces locale to the Struts Locale should be 
done inside the framework. It looks like this could added to some of the 
methods in org.apache.struts.faces.application.ViewHandlerImpl but I'm not 
sure which one.

Arthur

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to