[ http://issues.apache.org/jira/browse/MYFACES-1294?page=comments#action_12434187 ] Michael Lipp commented on MYFACES-1294: ---------------------------------------
I don't think this can be moved to a PhaseListener. The point simply is that no portlet application has access to the complete HTML produced by the portal; it can only contribute to the HTML of its portlet. Sure, you could demand that Tomahawk users put the extension filter in the web.xml of the *portal*. But first, I think this is not acceptable (you should be able to deploy a portlet into a running portal), second, you'll get classpath problems, and third the approach to post-fix the generated HTML isn't very clever anyway. Please do have a look at the solution that I have just posted as comment to TOMAHAWK-464. (I thought the ExtensionFilter issue was to be continued as a Tomahawk issue, because the ExtensionFilter is not part of MyFaces Core.) You'll find in there the required JavaScript sequences to achieve the same results in the generated HTML without filtering it. There is an AddResource implementation that has been tested for portlets and should be easily adaptable for stand-alone application (the "generation" calls of the AddResource API are ExtensionFilter specific, so I had to add some for the portlet environment). Eventually, it should be possible to avoid a configurable AddResource all together, because the default version works in both the servlet and portlet context. > Current logic of register extensionFilter not support portlet environment > ------------------------------------------------------------------------- > > Key: MYFACES-1294 > URL: http://issues.apache.org/jira/browse/MYFACES-1294 > Project: MyFaces Core > Issue Type: Bug > Components: Portlet_Support > Affects Versions: 1.1.4-SNAPSHOT > Reporter: Serg Maslyukov (http://webmill.askmore.info) > Priority: Blocker > > Current logic of register extensionFilter not support portlet environment > fiter mappings: > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <servlet-name>Faces Servlet</servlet-name> > </filter-mapping> > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> > </filter-mapping> > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>*.jsf</url-pattern> > </filter-mapping> > not work in portlet environment -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
