ICEfaces
  1. ICEfaces
  2. ICE-2037

iceTree: imageDir doesn't work when jsp page references styles from higher directory level

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      any

      Description

      Referencing the image directory from within the ice:tree component
      (<ice:tree id="tree" imageDir="./xmlhttp/css/xp/css-images/">)
      works fine as long as the referencing page is in the doc root directory.
      When the image directory is referenced from a higher level from within
      the directory structure, i.e. form /pages/tree.xhtml then a reference
      to './../xmlhttp/css/xp/css-images' only shows a part of the tree's images
      correctly. Some of the references are still pointing to './xmlhttp/css/xp/css-images'.

      This is probably a problem within the TreeRenderer since the styles are
      directly referenced from within it.

      1. tree.jspx
        3 kB
        yip.ng
      1. screenshot-1.jpg
        129 kB
      2. screenshot-2.jpg
        166 kB
      3. screenshot-3.jpg
        177 kB

        Activity

        Hide
        yip.ng added a comment -

        Screeshot of testing for the fix. Notice that the web page is from a second level directory, not the top level directory, and that the folder and document icons are now showing.

        Show
        yip.ng added a comment - Screeshot of testing for the fix. Notice that the web page is from a second level directory, not the top level directory, and that the folder and document icons are now showing.
        Hide
        yip.ng added a comment -

        To test, put the attached testing web page (tree.jspx) in a second level directory in component-showcase, e.g. component-showcase/web/pages/ and access it like this:
        http://localhost:8080/component-showcase/pages/tree.iface

        Notice in the web page source code that imageDir is set to "./../xmlhttp/css/xp/css-images/"

        Note also that the folder and document icons are specified in:
        component-showcase\src\com\icesoft\icefaces\samples\showcase\components\tree\NodeUserObject.java
        and you have to change their location reference as well:

        setLeafIcon("./../xmlhttp/css/xp/css-images/tree_document.gif");
        setBranchContractedIcon(
        "./../xmlhttp/css/xp/css-images/tree_folder_close.gif");
        setBranchExpandedIcon("./../xmlhttp/css/xp/css-images/tree_folder_open.gif");

        Show
        yip.ng added a comment - To test, put the attached testing web page (tree.jspx) in a second level directory in component-showcase, e.g. component-showcase/web/pages/ and access it like this: http://localhost:8080/component-showcase/pages/tree.iface Notice in the web page source code that imageDir is set to "./../xmlhttp/css/xp/css-images/" Note also that the folder and document icons are specified in: component-showcase\src\com\icesoft\icefaces\samples\showcase\components\tree\NodeUserObject.java and you have to change their location reference as well: setLeafIcon("./../xmlhttp/css/xp/css-images/tree_document.gif"); setBranchContractedIcon( "./../xmlhttp/css/xp/css-images/tree_folder_close.gif"); setBranchExpandedIcon("./../xmlhttp/css/xp/css-images/tree_folder_open.gif");

          People

          • Assignee:
            yip.ng
            Reporter:
            Michael Thiem
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: