Portlet Bridge
  1. Portlet Bridge
  2. PBR-63

Web app param org.richfaces.LoadScriptStrategy does not work

    Details

    • Affects:
      Compatibility/Configuration
    • Similar Issues:
      Show 10 results 

      Description

      Jboss portlet bridge's view handler doesn't initialize the RichFaces properly with context params. As a result, context parameters such as loadScriptStrategy and loadStyleStrategy are ignored and default value ALL is used, no matters what we specify at web.xml, thus loading resources such as javascript and css at per-portlet component level.

      I've tracked down the problem to commented-out line at /org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java. There supposed to be an initialize method call, so richfaces are initialized properly with context params.

      My proposed path:

          1. Eclipse Workspace Patch 1.0
            #P jbpb-impl
            Index: src/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java
            ===================================================================
          • src/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java (revision 236)
            +++ src/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java (working copy)
            @@ -63,7 +63,7 @@

      ViewResources viewResources = new ViewResources();

      • //viewResources.initialize(context);
        + viewResources.initialize(context);
        viewResources.processHeadResources(context);

      Object[] headEvents = (Object[])viewResources.getHeadEvents();

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Robert Duda added a comment -

            This issue is still not resolved. I use the latest RichFaces version 3.3.0.GA and PortletBridge 1.0.0.CR2. Values of org.richfaces.LoadStyleStrategy and org.richfaces.LoadScriptStrategy parametters in web.xml are ignored. RichFaces was not initialized properly and use default values for those parameters.

            I have also tried to use PortletBridge 1.0.0-SNAPSHOT and PortalResourceBuilder 1.0.0-SNAPSHOT and effect of this is strange because nothing is rendered. In server logs there is a message

            2009-06-02 09:24:44 org.jboss.portletbridge.AjaxPortletBridge doFacesRequest
            INFO: Finish rendering portletbridge for namespace

            but content of the portlet is empty.

            I also use Facelets 1.1.14, Mojarra 1.2.12.

            Show
            Robert Duda added a comment - This issue is still not resolved. I use the latest RichFaces version 3.3.0.GA and PortletBridge 1.0.0.CR2. Values of org.richfaces.LoadStyleStrategy and org.richfaces.LoadScriptStrategy parametters in web.xml are ignored. RichFaces was not initialized properly and use default values for those parameters. I have also tried to use PortletBridge 1.0.0-SNAPSHOT and PortalResourceBuilder 1.0.0-SNAPSHOT and effect of this is strange because nothing is rendered. In server logs there is a message 2009-06-02 09:24:44 org.jboss.portletbridge.AjaxPortletBridge doFacesRequest INFO: Finish rendering portletbridge for namespace but content of the portlet is empty. I also use Facelets 1.1.14, Mojarra 1.2.12.
            Hide
            Alex Krasov added a comment -

            Same problem again - this time with 1.0.0.CR2.

            Fixed with same action - uncomment init method call at PortletAjaxViewRootRenderer.java - see my report about the same problem at 1.0.0.B4

            Show
            Alex Krasov added a comment - Same problem again - this time with 1.0.0.CR2. Fixed with same action - uncomment init method call at PortletAjaxViewRootRenderer.java - see my report about the same problem at 1.0.0.B4
            Hide
            Wesley Hales added a comment -

            This is working properly in the 2.0 bridge trunk (will release beta soon)... we will try to backport the fixes from 2.0 to 1.0 next week.

            Show
            Wesley Hales added a comment - This is working properly in the 2.0 bridge trunk (will release beta soon)... we will try to backport the fixes from 2.0 to 1.0 next week.
            Hide
            Patrick Decat added a comment -

            Hi Wesley,

            I'm also encountering this issue with 1.0.0.CR3 / RichFaces 3.3.3.Final / eXo EE 1.0.2.

            Would you mind to explain why the initialization statement was commented out in the first place ?

            Your svn comment only mentions "small changes" and PBR-1 but I can't see any reason to skip this initialization.

            $ svn log http://anonsvn.jboss.org/repos/portletbridge/trunk/core/portletbridge-impl/src/main/java/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java -c 204
            ------------------------------------------------------------------------
            r204 | wesleyhales | 2008-09-02 03:46:43 +0200 (mar. 02 sept. 2008) | 1 ligne
             
            https://jira.jboss.org/jira/browse/PBR-1 small changes
            ------------------------------------------------------------------------
            $ svn diff http://anonsvn.jboss.org/repos/portletbridge/trunk/core/portletbridge-impl/src/main/java/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java -c 204
            Index: PortletAjaxViewRootRenderer.java
            ===================================================================
            --- PortletAjaxViewRootRenderer.java    (révision 203)
            +++ PortletAjaxViewRootRenderer.java    (révision 204)
            @@ -63,7 +63,7 @@
             
                                            ViewResources viewResources = new ViewResources();
             
            -                               viewResources.initialize(context);
            +                               //viewResources.initialize(context);
                                            viewResources.processHeadResources(context);
             
                                            Object[] headEvents = (Object[])viewResources.getHeadEvents();

            Best regards,
            Patrick.

            Show
            Patrick Decat added a comment - Hi Wesley, I'm also encountering this issue with 1.0.0.CR3 / RichFaces 3.3.3.Final / eXo EE 1.0.2. Would you mind to explain why the initialization statement was commented out in the first place ? Your svn comment only mentions "small changes" and PBR-1 but I can't see any reason to skip this initialization. $ svn log http://anonsvn.jboss.org/repos/portletbridge/trunk/core/portletbridge-impl/src/main/java/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java -c 204 ------------------------------------------------------------------------ r204 | wesleyhales | 2008-09-02 03:46:43 +0200 (mar. 02 sept. 2008) | 1 ligne   https://jira.jboss.org/jira/browse/PBR-1 small changes ------------------------------------------------------------------------ $ svn diff http://anonsvn.jboss.org/repos/portletbridge/trunk/core/portletbridge-impl/src/main/java/org/jboss/portletbridge/renderkit/portlet/PortletAjaxViewRootRenderer.java -c 204 Index: PortletAjaxViewRootRenderer.java =================================================================== --- PortletAjaxViewRootRenderer.java (révision 203) +++ PortletAjaxViewRootRenderer.java (révision 204) @@ -63,7 +63,7 @@ ViewResources viewResources = new ViewResources(); - viewResources.initialize(context); + //viewResources.initialize(context); viewResources.processHeadResources(context); Object[] headEvents = (Object[])viewResources.getHeadEvents(); Best regards, Patrick.
            Hide
            Ken Finnigan added a comment -

            1.0.0 version no longer supported

            Show
            Ken Finnigan added a comment - 1.0.0 version no longer supported

              People

              • Assignee:
                Alexander Smirnov
                Reporter:
                Alex Krasov
              • Votes:
                5 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development