I have created a simple application that uses 2 languages - english and polish. I want to set locale with html link for myfaces and jstl tags. The problem is that when i press the link, it only changes the messages outputed by jsf tags. The jstl messages remain unchanged. The locale is changing (checked with cut) but messages aren`t. The funniest thing happends when i change language to english and check the chceckbox - All messages change to english and the jstl locale variable is emptied (cut doesn`t write anything out).
This example worked with jsf1.1.5 but it doesn`t work with jsf 1.2. Can any one tell me why??
I enclose the code of this example: welcome.jsp
User.java
faces-config.xml
I`ve tried to download new jstl.jar and standard.jar, add tlds and declarations in web.xml but it didn`t help.
If anyone knows answer to this mystery please help.
Piotr Cierny
Greenhorn
Joined: Jul 21, 2008
Posts: 6
posted
0
This is my first post. Sorry for bad code. here is a good one.
welcome.jsp
User.java
faces-config.xml
Ryan Lubke
Ranch Hand
Joined: Jun 20, 2007
Posts: 36
posted
0
This was cross-posted in the sun forums. I've already answered there.
Originally posted by Piotr Cierny: I have created a simple application that uses 2 languages - english and polish. I want to set locale with html link for myfaces and jstl tags. The problem is that when i press the link, it only changes the messages outputed by jsf tags. The jstl messages remain unchanged. The locale is changing (checked with cut) but messages aren`t. The funniest thing happends when i change language to english and check the chceckbox - All messages change to english and the jstl locale variable is emptied (cut doesn`t write anything out).
This example worked with jsf1.1.5 but it doesn`t work with jsf 1.2. Can any one tell me why??
I enclose the code of this example: welcome.jsp
User.java
faces-config.xml
I`ve tried to download new jstl.jar and standard.jar, add tlds and declarations in web.xml but it didn`t help.
If anyone knows answer to this mystery please help.
Piotr Cierny
Greenhorn
Joined: Jul 21, 2008
Posts: 6
posted
0
I fixed the problem by adding locale="#{facesContext.viewRoot.locale}" to f:view tag.
But could anyone explain me why this does`t work without specifying the locale in the view tag?
Shouldn`t the fmt:setLocale tag set locale for jstl tags only using parameter given in URL