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

          Arran Mccullough created issue -
          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.
          Brad Kroeger made changes -
          Field Original Value New Value
          Link This issue duplicates IPCK-71 [ IPCK-71 ]
          Brad Kroeger made changes -
          Assignee Brad Kroeger [ brad.kroeger ] Deryk Sinotte [ deryk.sinotte ]
          Arran Mccullough made changes -
          Link This issue blocks IPCK-76 [ IPCK-76 ]
          Hide
          Deryk Sinotte added a comment -

          Assigning to Mircea

          Show
          Deryk Sinotte added a comment - Assigning to Mircea
          Deryk Sinotte made changes -
          Assignee Deryk Sinotte [ deryk.sinotte ] Mircea Toma [ mircea.toma ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8.2.GA_P01 [ 10221 ]
          Assignee Priority P1
          Ken Fyten made changes -
          Salesforce Case []
          Affects [Compatibility/Configuration]
          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.
          Brad Kroeger made changes -
          Link This issue blocks IPCK-71 [ IPCK-71 ]
          Brad Kroeger made changes -
          Link This issue blocks IPCK-58 [ IPCK-58 ]
          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."
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: