1 Reply Latest reply on Dec 13, 2007 6:00 AM by Auke van Leeuwen

    rich tree   <rich:treeNode icon="", the  icon problem

    jak wei Newbie

      hello all :

      i use <rich:tree and <rich:treeNode tlg , but the provlem occur when

      display the icon ,when the pro in the IE browser the icon display is ok ,

      but use the firefox browser the icon not display ;

      please help me , thank you !!!

      this is my page code ;

      
      <rich:tree id="tre" switchType="client" value="#{mapbean.roleForm.treeBean.data}" var="item"
       toggleOnClick="true" style="width:300px" >
       <rich:treeNode icon="#{item.icon}" iconLeaf="#{item.leafIcon}">
       <h:outputLabel value="#{item.name}"/>
       </rich:treeNode>
      </rich:tree>


      and this is my java code;


      public String getIcon() {
       String icon="";
       if ("P".equals(getObjectType()))
       icon="images\\ico_page.gif";
       if("M".equals(getObjectType()))
       icon="images\\ico_menu.gif";
       if("I".equals(getObjectType()))
       icon="images\\ico_contral.gif";
       if("T".equals(getObjectType()))
       icon="images\\ico_table.gif";
       return icon;
       }
      
      




        • 1. Re: rich tree   <rich:treeNode icon=
          Auke van Leeuwen Newbie

           

          "jak.wei" wrote:

          in the IE browser the icon display is ok ,
          but use the firefox browser the icon not display ;
          public String getIcon() {
           String icon="";
           if ("P".equals(getObjectType()))
           icon="images\\ico_page.gif";
           if("M".equals(getObjectType()))
           icon="images\\ico_menu.gif";
           if("I".equals(getObjectType()))
           icon="images\\ico_contral.gif";
           if("T".equals(getObjectType()))
           icon="images\\ico_table.gif";
           return icon;
           }
          



          You probably need to use forward slashes to return the icon. Since it eventually will be part of an source attribute somewhere. So:

          icon="images/ico_table.gif";