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

    PortletBridge 2.1.0 with RichFaces. Problems with ResourceUrls

    Markus Staab Newbie



      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



      but since I upgraded they now look like



      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?




        • 1. Re: PortletBridge 2.1.0 with RichFaces. Problems with ResourceUrls
          Markus Staab Newbie

          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 ?




          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
            Markus Staab Newbie

            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.