You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Neil Griffin (JIRA)" <de...@myfaces.apache.org> on 2010/02/05 22:08:28 UTC

[jira] Commented: (PORTLETBRIDGE-112) Improve compatibility with Liferay Portal for portlets that extend GenericFacesPortlet

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

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

See also: http://issues.liferay.com/browse/LPS-3082

> 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.