2 Replies Latest reply on Jun 10, 2010 5:04 AM by harpritt

    dynamic icon for rich:tree

    harpritt

      Hi

       

      ive bee struggling with the fllowing for about 3 hours and havnt really come up with a solution that i like.

       

      i want to display a different folder icon depending on the state of the child node.

       

      like this.

       

      <rich:tree switchType="ajax">

           <rich:recursiveTreeNodesAdaptor id="classd" roots="#{parent.children}" var="child" nodes="#{child.children}">

                <rich:treeNode icon="if child.somthing() then IconA else IconB">

       

      ..........

       

       

      all i can come up with is add a method to the child nodes that determines the icon like

       

      then....

       

      icon="#{child.icon}";

       

      i dont really like this.

       

      any help is appreciated