my dog learned polymorphism
The moose likes JSF and the fly likes PhaseListener: before or after which phase should I set the locale?    Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "PhaseListener: before or after which phase should I set the locale?    " Watch "PhaseListener: before or after which phase should I set the locale?    " New topic
Author

PhaseListener: before or after which phase should I set the locale?

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 383
Hello,
I use restfaces an I have UrLs such as mydomain.com/fr/book/etc
where /fr/ is the desired locale. I have tried retrieving the locale string from the URL and setting the locale from a PhaseListener before the renderResponse phase but it does not work i.e. when I change the locale in the address bar to /en/book/etc it will not change the locale. Any clue?
Thanks in advance,
JUlien.

Here is the phase listener:



Here is the managed bean (I actually use spring):


The problem I get is that the jsp page still display today's date in french...
Julien.

I meant "sculpture" instead of "book"
[ July 09, 2008: Message edited by: Julien Martin ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PhaseListener: before or after which phase should I set the locale?
 
Similar Threads
Injection problem - not quite sure if this is something i should be using injection for
My app displays memory leaks: please help
Question on rendering
My valueChangeListener is never being called...
h:commandButton action not working