[ 
https://issues.apache.org/jira/browse/PORTLETBRIDGE-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852849#action_12852849
 ] 

Neil Griffin commented on PORTLETBRIDGE-112:
--------------------------------------------

This is something that would best be fixed in the Liferay portlet container 
itself. We can do this for Liferay 6, but Liferay 4.x and Liferay 5.x are not 
getting dot-releases anymore. My guess is that Liferay 5.x has the widest 
deployment, so that's why I recommended putting the hack in the bridge.

> Improve compatibility with Liferay Portal for portlets that extend 
> GenericFacesPortlet
> --------------------------------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-112
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-112
>             Project: MyFaces Portlet Bridge
>          Issue Type: Improvement
>          Components: Impl
>    Affects Versions: 2.0.0-alpha
>            Reporter: Neil Griffin
>
> Liferay Portal 5.2.3 (and newer) has a PortletInvokerImpl.isFacesPortlet() 
> method that will return true if the value of the <portlet-class> from 
> WEB-INF/portlet.xml for "javax.portlet.faces.GenericFacesPortlet". However, 
> if someone needs to subclass javax.portlet.faces.GenericFacesPortlet and 
> override the getBridgeClassName() method, then Liferay's 
> PortletInvokerImpl.isFacesPortlet() will return false.
> The purpose of PortletInvokerImpl.isFacesPortlet() is really just for 
> Liferay's PortletRequestImpl.init(HttpServletRequest, Portlet, 
> InvokerPortlet, PortletContext, WindowState, PortletMode, PortletPreferences, 
> long) method, which will strip-off the namespace from request parameters for 
> all portlets except JSF portlets.
> This is somewhat of a hack, but in order to fake-out Liferay's 
> PortletRequestImpl.init(...) method, I am recommending that you have the 
> MyFaces Bridge's PortletExternalContextImpl.encodeNameSpace(String) method 
> from this:
>   public String encodeNamespace(String s)
>   {
>     return ((PortletResponse) mPortletResponse).getNamespace() + s;
>   }
> To this:
>   private static final String LIFERAY_NAMESPACE_PREFIX_HACK = "A";
>   public String encodeNamespace(String s)
>   {
>     return (LIFERAY_NAMESPACE_PREFIX_HACK + (PortletResponse) 
> mPortletResponse).getNamespace() + s;
>   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to