3 Replies Latest reply on Jul 13, 2007 5:25 PM by Nick Belaevski

    Tree:Probme in Node expansion &

    Novin Newbie

      Hi Friends,

      I m using ajax4jsf-1.1.1.jar, richfaces-3.0.1.jar fro rich tree implementation and tree is working fine but facing following problems.
      Pls help me its urgent for me to solve this problem.

      Thanking you in advance.

      Tree type : ajax

      Problem:

      1) Expansion:

      First time when page is loaded : On any first node click I have to click 3 time than only It got expanded(any node).

      Once one node is expanded other node expansion work fine in single click.

      2) Is it mandatory to add at one child node to any node when the tree is rendered to make th parent node visible with folder img instead of with document image.

      I want my all node with first level to be rendered with the image of folder(showing it has some child nodes) without adding any dummy node.

      3) is there any way to override the images such folder and document img
      or if i d'not want the images then wht should I do?

      Regards,
      Novin

        • 1. Re: Tree:Probme in Node expansion &
          Novin Newbie

          Hi friends,

          I found the solution

          Problem2): No node to add a dummy node

          public boolean isLeaf() {
          if(this.type.equalsIgnoreCase("groupname-node"))
          return false;
          else
          return childrenMap.isEmpty();
          }

          • 2. Re: Tree:Probme in Node expansion &
            Novin Newbie

            Guys pls help

            Still I m facing problem 1 & 3.

            regards,
            Novin

            • 3. Re: Tree:Probme in Node expansion &
              Nick Belaevski Master

              Novin,

              1) Some problems were seen with inner node contents in 3.0.1, but not with nodes expansion. Could it be that server for some reason processes requests so slowly that you make three clicks before response comes? Or could you please provide sample application demonstrating the problem? I can be reached at nbelaevski at exadel.com. Thank you!

              2) Fine workaround, however I would recommend to add treeNode component with icon facets customized as desired and use it to construct representation for the root nodes.

              3) iconLeaf & icon facets could be used to redefine document & folder icons. Theese facets can be defined on treeNode or on tree components.