ICEfaces
  1. ICEfaces
  2. ICE-4314

Component images are not displayed in portlets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8RC2
    • Fix Version/s: 1.8
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      portal portlet component showcase
    • Affects:
      Sample App./Tutorial

      Description

      Some of the samples in the Component Showcase use images for various things. If those images are referenced relatively, then they won't be properly resolved in a portlet environment. The current problems are in:

      - data paginator (the arrows)
      - table expandable (triangles)
      - tree (arrows and node lines)
      - download resource (the image link)

        Activity

        Hide
        Deryk Sinotte added a comment -

        The first three components are all related to the StyleBean class which sets up a map to store the available styles and image directory like so:

        styleMap = new HashMap(3);
        styleMap.put(RIME, new StylePath(
        "./xmlhttp/css/rime/rime.css",
        "./xmlhttp/css/rime/css-images/"));
        styleMap.put(XP, new StylePath(
        "./xmlhttp/css/xp/xp.css",
        "./xmlhttp/css/xp/css-images/"));
        styleMap.put(ROYALE, new StylePath(
        "./xmlhttp/css/royale/royale.css",
        "./xmlhttp/css/royale/css-images/"));

        Unfortunately, the relative references to the images won't resolve in a portlet. The last one (output resource) has a relative reference right in the page code:

        <ice:outputResource id="pdf-image"
        resource="#

        {resourceBean.pdfResource}

        " mimeType="application/pdf"
        fileName="Enterprise-Ajax-Security-with-ICEfaces.pdf"
        image="./images/button-submit.gif" />

        Changing all these to absolute references solves the problem for portlets while still allowing the Component Showcase to operate properly in non-portlet environments.

        Show
        Deryk Sinotte added a comment - The first three components are all related to the StyleBean class which sets up a map to store the available styles and image directory like so: styleMap = new HashMap(3); styleMap.put(RIME, new StylePath( "./xmlhttp/css/rime/rime.css", "./xmlhttp/css/rime/css-images/")); styleMap.put(XP, new StylePath( "./xmlhttp/css/xp/xp.css", "./xmlhttp/css/xp/css-images/")); styleMap.put(ROYALE, new StylePath( "./xmlhttp/css/royale/royale.css", "./xmlhttp/css/royale/css-images/")); Unfortunately, the relative references to the images won't resolve in a portlet. The last one (output resource) has a relative reference right in the page code: <ice:outputResource id="pdf-image" resource="# {resourceBean.pdfResource} " mimeType="application/pdf" fileName="Enterprise-Ajax-Security-with-ICEfaces.pdf" image="./images/button-submit.gif" /> Changing all these to absolute references solves the problem for portlets while still allowing the Component Showcase to operate properly in non-portlet environments.
        Hide
        Deryk Sinotte added a comment -

        Changed relevant relative references to absolute.

        Show
        Deryk Sinotte added a comment - Changed relevant relative references to absolute.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: