JSF 2.0: locale change only after page refresh
I'm upgrading a small (working) programme from JSF 1.2 and JSP to JSF 2.0 and Facelets.
My problem is that locale change which is referenced on the Facelet page as
works only after the page is manually refreshed (after the locale change form has been submitted).
I have tried various methods with no success yet:
- form button with immediate="true" and context.getViewRoot().setLocale(new Locale("xx", "YY")) in managed bean code
- normal form without immediate="true"
- an ajax button with
Googling for this turned up a couple of similar problems but no working solutions.