You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/02/12 17:18:34 UTC
DO NOT REPLY [Bug 26895] New: -
Faces locale is not set to the struts locale
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: struts-dev@jakarta.apache.org
ReportedBy: arthur.fitt@netregulus.com
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: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org