Hi The problem with this is we are talking about two different things. The code that detects a portlet environment was designed for:
- JSR-301: Portlet 1.0 Bridge for JavaServer Faces 1.2 - JSR-329: Portlet 2.0 Bridge for JavaServer Faces 1.2 - Portlet 2.0 Bridge for JavaServer Faces 2.0 But what you need is another different thing. I suppose this is an alternate bridge. Now the question is how to make it work with MyFaces? Probably an SPI interface is a good idea, but I don't really know if the (really very few) places that check for portlet bridge are "well known" and will be necessary for websphere portlet bridge. It is still unknow if it is necessary some additional hack. I think ExternalContextUtils works as expected, and it is not necessary to change that part. To increase the chances this could be added to myfaces, you can create a patch and attach it to myfaces issue tracker, so one committer can check it and apply it. Other option is create a web config param to enable portlet mode. It could be more simple. regards, Leonardo Uribe 2011/10/26 Paul Nicolucci <[email protected]>: > > Hello Everyone, > > I've opened MYFACES-3375 and would like to propose a solution and receive > some feedback. The proposed solution is as follows: > > 1) New Class PortletBridgeDetector > - bridgeEnabled() - This method will use the Application Class loader > to determine if a Portlet Bridge Class is available in the container and as > such can be used to determine if Portlets are supported. > > 2) Class ExternalContextUtils.isPortlet - This MyFaces class/method should > be updated to get an instance of the PortletBridgeDetector and then return > the value of the PortletBridgeDetector.isEnabled(). > > We should be able to use the meta-inf/services discovery pattern to point > to the implementation of the PortletBridgeDetector that the user wants to > use ( WebSpherePortletBridgeDetector, ApachePortletBridgeDetector etc ). > > What does everyone think about this proposed solution? I'd like to start a > discussion about it, once agreed upon a solution I'll work to implement and > test. > > Thanks, > > Paul Nicolucci > __________________ > IBM - WEB Components > [email protected] > >
