ICEfaces
  1. ICEfaces
  2. ICE-6782

Slider component resource not resolving when run as a portlet

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-EE-Beta1, 2.0.1
    • Fix Version/s: EE-2.0.0.GA, 2.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces 2 portal portlet ACE slider

      Description

      The default "thumb" resources for the Slider are not properly resolving in a portlet. If we assume we have the Slider on a portal page with the following URL:

      http://localhost:8080/web/guest/ace-maint

      there are are a couple of "thumb-*" images that are being rendered out. Firebug shows 404 not found for:

      http://localhost:8080/web/guest/javax.faces.resource/assets/skins/sam/thumb-x.png.jsf?ln=yui/3_1_1
      http://localhost:8080/web/guest/javax.faces.resource/assets/skins/sam/thumb-y.png.jsf?ln=yui/3_1_1

      These URLs are missing information about the portlet namespace and other Liferay attributes. I can manually get it to resolve in the browser by taking a copy of a resource that is resolving and simply massaging it into a working one like so:

      http://localhost:8080/web/guest/ace-maint?_slider_WAR_aceshowcaseportlet_INSTANCE_R8mz_javax.faces.resource=assets/skins/sam/thumb-x.png&_slider_WAR_aceshowcaseportlet_INSTANCE_R8mz_ln=yui%2F3_1_1&p_p_cacheability=cacheLevelPage&p_p_col_count=1&p_p_col_id=column-1&p_p_id=slider_WAR_aceshowcaseportlet_INSTANCE_R8mz&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal

      Looking at the SliderEntry.java class, we have the following code:

          public String getThumbUrl() {
           String thumbUrl = super.getThumbUrl();
           if (null == thumbUrl) {
           if ("x".equals(getAxis())) {
           thumbUrl = "javax.faces.resource/assets/skins/sam/thumb-x.png.jsf?ln=yui/3_3_0";
           } else {
           thumbUrl = "javax.faces.resource/assets/skins/sam/thumb-y.png.jsf?ln=yui/3_3_0";
           }
           }
           return thumbUrl;
          }

      It's not possible to simply hard code in URL references like this and have them successfully resolve. For portlets, this will miss portal specific attributes as well as the namespacing. This is particulary true in portlets but it could be relevant in a stock servlet application as well.

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ken Fyten made changes -
        Fix Version/s 2.0.2 [ 10273 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Priority P2
        Resolution Fixed [ 1 ]
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Assignee Priority P2
        Affects Version/s 2.0.1 [ 10255 ]
        Affects Version/s 2.0.0-EE-Beta1 [ 10250 ]
        Assignee Ken Fyten [ ken.fyten ]
        Deryk Sinotte created issue -

          People

          • Assignee:
            Ken Fyten
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: