Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta
-
Component/s: Sample Apps
-
Labels:None
-
Environment:MyFaces 2 Component Showcase
-
Assignee Priority:P2
-
Affects:Sample App./Tutorial
Description
When running the compat Component Showcase, the pull down menu for choosing a language does not work when running on MyFaces 2. The problem is related to the issue reported in ICE-7236 found during regression testing. Basically the f:loadBundle tag was not designed to work with Ajax requests and MyFaces appears to be more strict about this than Mojarra. The solution is to apply the application-level changes outlined in the other case:
- remove the f:loadBundle tag
- wrap the markup in <f:view locale="#{testBean.locale}"> so that the locale is set right at the view level
- set the locale in the appropriate place via
FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(locale));
- add something similar to the following to the faces-config.xml file:
<resource-bundle>
<base-name>org.icefaces.application.showcase.view.resources.messages</base-name>
<var>msgs</var>
</resource-bundle>
- remove the f:loadBundle tag
- wrap the markup in <f:view locale="#{testBean.locale}"> so that the locale is set right at the view level
- set the locale in the appropriate place via
FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(locale));
- add something similar to the following to the faces-config.xml file:
<resource-bundle>
<base-name>org.icefaces.application.showcase.view.resources.messages</base-name>
<var>msgs</var>
</resource-bundle>
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #26199 | Tue Nov 01 16:22:07 MDT 2011 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/samples/compat/component-showcase/src/main/webapp/WEB-INF/includes/templates/page-template.xhtml
MODIFY /icefaces2/trunk/icefaces/samples/compat/component-showcase/src/main/webapp/WEB-INF/faces-config.xml |