2 Replies Latest reply on Nov 16, 2011 3:21 AM by maggus

    PortletBridge 2.1.0 with RichFaces. Problems with ResourceUrls

    maggus

      Hi,

       

      i recently updated our portlets to PortletBridge 2.1.0-FINAL. I also Updated the RichFaces to 3.3.3.

      We use Liferay 5.2.4 and JSF 1.2

       

      I got problems when richfaces tries to include/render resources like css-assets or images.

      The urls which are generated by the framework looks like Portlet 2.0 ResourceUrls, but do not point to the /faces servlet.

       

      Before the upgrade an URL generated by RichFaces looks like

      http://localhost:8080/addressbook/faces/rfGlobalorg.richfaces.renderkit.html.iconimages.DataTableIconSortNone/DATB/eAFjYGD4!!8!AAYAAv4_

       

      but since I upgraded they now look like

      http://localhost:8080/portal/web/cust/home?p_p_id=Adressbuch_WAR_addressbook_INSTANCE_9PAc&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=%2Forg.rf.resorg.richfaces.renderkit.html.iconimages.DataTableIconSortNone%2FDB%2FeAFjYGD4%21%218%21AAYAAv4_&p_p_cacheability=cacheLevelPage&p_p_col_id=column-2&p_p_col_pos=2&p_p_col_count=4

       

      I took a look at RENDER_POLCY parameter etc. but can't find the reason, why those url do not work anymore using PortletBrige2 (before we used PortletBridge1 Beta).

       

      Maybe somebody can give me a hint into the right direction?

       

      Thanks,

      Markus

        • 1. Re: PortletBridge 2.1.0 with RichFaces. Problems with ResourceUrls
          maggus

          I took the PorletBridge 2.2.0-FINAL and gave it another try.

          The result below:

           

           

          I found the error in the portlet bridge, which leads to those buggy urls.

           

          the resources of the renderkit (in this example the org.richfaces.renderkit.html.iconimages.DataTableIconSortNone) is not considered as an "specialResource" in the PortletResourceBuilder (see screenshot).

           

          the parameter which is passed into the function uses "." as path-separater instead of "/". therefore this path does not match one of the entries in the specialResources String[].

          btw: why does this renderkit constant end in 1$1 ?

           

          resourceicon_eclipse.png

           

          Since our resource is considered as a "non-special url" the org.jboss.portletbridge.richfaces.PortletResourceBuilder.getUri() method creates a portlet-resource-url.

           

           

          if i take the debugger and make the org.jboss.portletbridge.richfaces.PortletResourceBuilder.specialResource(InternetResource resource) to return true for this resources, the gui looks fine. all images are rendered correctly.

           

          Any thoughts?

          • 2. Re: PortletBridge 2.1.0 with RichFaces. Problems with ResourceUrls
            maggus

            opened a bug ticket with the information i gathered. the problem itself looks like an error while ressource-registration and not like a portlet bridge bug.

             

            https://issues.jboss.org/browse/RF-11700