[
https://issues.apache.org/jira/browse/PORTLETBRIDGE-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Freedman resolved PORTLETBRIDGE-100.
--------------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
1.0.0
Solution as stated in the report -- cache the locale and reset manually.
> Locale setting not working in JSF CarDemo
> -----------------------------------------
>
> Key: PORTLETBRIDGE-100
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-100
> Project: MyFaces Portlet Bridge
> Issue Type: Bug
> Components: Impl
> Affects Versions: 1.0.0-beta, 2.0.0-alpha
> Reporter: Michael Freedman
> Assignee: Michael Freedman
> Fix For: 1.0.0, 2.0.0
>
>
> The first page of the JSF sample CarDemo has you set the locale for the demo.
> You choose a language/region and the rest of the views use strings earmarked
> for the language of the locale. In the portlet case this fails -- you always
> use the English/default locale. This is because the demo relies on an
> ActionHandler to set the locale of the ViewRoot of the current view -- which
> subsequently is migrated (by Faces) during the createView of the view the
> action handler navigates to. When you render the subsequent view it uses
> this locale. In the portlet case because render happens in a separate
> request -- we rely on the bridge to cache the viewroot from the end of the
> action and preset set it as the current viewRoot prior to running the
> lifecycle. Well Faces has code in its restoreView phase that if the ViewRoot
> was preset then it resets its locale to the preferred one from the current
> request. I.e. we lose the locale we wanted (that was set when the view was
> created at the end of the action). To fix this, cache the locale in the
> beforePhase (of restoreView) if using the preset ViewRoot and restore it in
> the afterPhase.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.