[webbeans-issues] [JBoss JIRA] Created: (WBRI-257) <f:view> erases conversation id UIViewRoot attribute in JSF 2
by Dan Allen (JIRA)
<f:view> erases conversation id UIViewRoot attribute in JSF 2
-------------------------------------------------------------
Key: WBRI-257
URL: https://jira.jboss.org/jira/browse/WBRI-257
Project: Web Beans
Issue Type: Bug
Components: Contexts
Affects Versions: 1.0.0.PREVIEW1
Reporter: Dan Allen
Assignee: Nicklas Karlsson
Fix For: 1.0.0.PREVIEW2
JSF 2 now builds the view in the Render Response phase. If JSF encounters the <f:view> tag while building the view, it resets the UIViewRoot, wiping out any attributes that might have been set in a phase listener before the Render Response phase. Thus, the conversation id becomes a vicitim of this sweep:
FacesContext.getCurrentInstance().getViewRoot().getAttributes().put(CONVERSATION_PROPAGATION_KEY, cid);
This problem is not present in JSF 1 since the view is already constructed by the time this call is made by the WebBeansPhaseListener before the Render Response phase.
The solution is to approach conversation propagation differently for JSF 2. Instead of using a phase listener, a SystemEventListener should be used that monitors the PreRenderViewEvent. SystemEventListeners can be registered programmatically, which should be done sometime after JSF 2 starts (the version of JSF can be detected in WebBeans)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months
[webbeans-issues] [JBoss JIRA] Created: (WBX-38) ServletWebBeanDiscovery should scan /META-INF/beans.xml
by Dan Allen (JIRA)
ServletWebBeanDiscovery should scan /META-INF/beans.xml
-------------------------------------------------------
Key: WBX-38
URL: https://jira.jboss.org/jira/browse/WBX-38
Project: Web Beans Extensions
Issue Type: Bug
Components: Servlet Containers
Affects Versions: Servlet Containers 1.0.0.CR1
Reporter: Dan Allen
Assignee: Dan Allen
Fix For: Servlet Containers 1.0.0.CR2
ServletWebBeanDiscovery.scan() looks for beans.xml rather than /META-INF/beans.xml. This should be fixed to match the spec. The intro to chapter 11 reads:
Bean classes must be deployed in an EAR, WAR, EJB-JAR or JAR archive or directory in the application classpath that has a file named beans.xml in the metadata directory (META-INF, or WEB-INF in the case of a WAR). If a bean is deployed to a location that is not in the application classpath, or does not contain a file named beans.xml in the metadata directory, it will not be discovered by the container.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months