Mar 22nd, 2011, 05:40 AM
Locale change not reflected in viewRoot
I'm using spring webflow 2.0.8 with JSF.
I have configured the FlowHandlerMapping with a LocaleChangeInterceptor, so that a locale change in the page is intercepted and updates the locale in the cookie-based LocaleResolver.
However, I developed a facelets function that formats a date input based on the locale. The locale is resolved by reading the current viewRoot's locale, but it does not reflect the locale change.
As far as I can see, the locale is not reapplied to the viewRoot when the current view remains the same, which is the case here : changing the locale redirects to the same view (see JsfViewFactory.getview()).
Since I am the function developer, I have adapted my code so that formatting the date involves the mvc RequestContext's locale instead of getting the viewRoot's locale, but this should not happen.
Why do I get this ?