ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-75

Composite components built in images not showing in a portlet environment

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2.GA
    • Fix Version/s: 1.8.2.GA_P01
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      Portlet
    • Affects:
      Compatibility/Configuration

      Description

      Some of the composite components (treeTable, editableDataTable) use image path references that are not working in a portlet environment. This issue was fixed in the regular components by the use of the imageDir attribute and by changing the ICEfaces default CSS files. With most composite components there is no way to control these images paths.

        Issue Links

          Activity

          Hide
          Brad Kroeger added a comment -

          We need to standardize how we reference images in our composite comonent .xhtml source. The source page uses html img tag, ice:graphicImage and ice:commandButton img attribute.

          Assigning to Deryk as IPCK-71 is already assigned to me and Deryk was going to bring this up with the core team.

          Show
          Brad Kroeger added a comment - We need to standardize how we reference images in our composite comonent .xhtml source. The source page uses html img tag, ice:graphicImage and ice:commandButton img attribute. Assigning to Deryk as IPCK-71 is already assigned to me and Deryk was going to bring this up with the core team.
          Hide
          Deryk Sinotte added a comment -

          Assigning to Mircea

          Show
          Deryk Sinotte added a comment - Assigning to Mircea
          Hide
          Brad Kroeger added a comment -

          Revision #22945 'Absolute Relative' references standard in ICEfaces component images. This means you precede image urls with a / ie: /xmlhttp/css/rime/css-images/tree_line_vertical.gif. This results in our servlet adding the context appropriately and images being accessible whether the source page is in the root of the web application or another folder nested in the root.

          HTML <img> tags have been replaced with ice:graphicImage tags for consistency. The <img> tag urls were not processed by our servlet to add the appropriate context to the absolute relative url.

          Show
          Brad Kroeger added a comment - Revision #22945 'Absolute Relative' references standard in ICEfaces component images. This means you precede image urls with a / ie: /xmlhttp/css/rime/css-images/tree_line_vertical.gif. This results in our servlet adding the context appropriately and images being accessible whether the source page is in the root of the web application or another folder nested in the root. HTML <img> tags have been replaced with ice:graphicImage tags for consistency. The <img> tag urls were not processed by our servlet to add the appropriate context to the absolute relative url.
          Hide
          Mircea Toma added a comment -

          As Brad already discovered, we need to replace all the 'img' tags with graphicImage components. The components calculate the path to resources by using framework's ViewHandler.getResourceURL method. Additionally the path passed to the component should start with '/' thus the calculated URL will be an absolute path that contains the web-application context path.

          Here's the ViewHandler.getResourceURL javadoc:
          "Return a URL suitable for rendering (after optional encoding perfomed by the encodeResourceURL() method of ExternalContext that selects the specifed web application resource. If the specified path starts with a slash, it must be treated as context relative; otherwise, it must be treated as relative to the action URL of the current view."

          Show
          Mircea Toma added a comment - As Brad already discovered, we need to replace all the 'img' tags with graphicImage components. The components calculate the path to resources by using framework's ViewHandler.getResourceURL method. Additionally the path passed to the component should start with '/' thus the calculated URL will be an absolute path that contains the web-application context path. Here's the ViewHandler.getResourceURL javadoc: "Return a URL suitable for rendering (after optional encoding perfomed by the encodeResourceURL() method of ExternalContext that selects the specifed web application resource. If the specified path starts with a slash, it must be treated as context relative; otherwise, it must be treated as relative to the action URL of the current view."

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: