[ https://issues.apache.org/jira/browse/PORTLETBRIDGE-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13013890#comment-13013890 ]
Neil Griffin commented on PORTLETBRIDGE-206: -------------------------------------------- I tried implementing this with facesContext.getAttributes.put(name, value) but couldn't make it work. I had to use portletRequest.setAttribute(name, value) instead. Explanation: The bridge's ExternalContext implementation needs to get access to the BridgeContext during construction. At this time, the FacesContext is also undergoing construction. Therefore it is not possible for the ExternalContext implementation to call FacesContext.getCurrentInstance().getAttributes().get(name). However, it can call portletRequest.getAttribute(name) since the portletRequest is passed to the ExternalContext implementation during construction. > Proposal for 3.0 API: New constant Bridge.BRIDGE_CONTEXT_ATTRIBUTE > ------------------------------------------------------------------ > > Key: PORTLETBRIDGE-206 > URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-206 > Project: MyFaces Portlet Bridge > Issue Type: New Feature > Components: General > Affects Versions: 3.0.0 > Reporter: Neil Griffin > Assignee: Michael Freedman > > Proposal is to add the following constant to Bridge.java: > public static final String BRIDGE_CONTEXT_ATTRIBUTE = > "javax.portlet.faces.bridgeContext"; > And to require implementations of the Bridge interface to set this attribute > in each of the doFacesRequest(...) methods. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira