1 Reply Latest reply on Sep 26, 2013 8:04 AM by saulo.costa

    Expanded Tree in RichFaces.....

    saulo.costa

      Hello to all,

      I have a tree in RichFaces that perfectly brings my data as required by the customer. These data are assembled EXPANDED screen and the desire of the customer is as follows:

      * In addition to data EXPANDED be coming, he would have the option to withdraw this data to facilitate reading, eg:

      default

      - 1

          - 1.1

             - 1.1.1

      User chose

      - 1

         + 1.1

       

      Hugs to everyone and I thank the reading and response

       

      Saulo Costa

        • 1. Re: Expanded Tree in RichFaces.....
          saulo.costa

          Hello,

           

          very good after breaking his head and a few nights of sleep, the solution for the process of manipulating the Tree is as follows:

           

          * For building at runtime a Tree already open and then with possibilities for manipulation + / -, the following XHTML:

           

          <rich:tree id="tree1" value="#{cfMB.treeNode}" var="node" toggleType="client" toggleNodeEvent="true">

          <rich:treeNode id="treeNode1" binding="#{cfMB.uirootNode}" expanded="#{cfMB.expandirTree}">

          <h:outputText id="outputText3" value="#{node.data}" />

          </rich:treeNode>

          </rich:tree>

           

          MB

              private TreeNode rootNode = null;

              private UITreeNode uirootNode;

            public void setUirootNode(UITreeNode uirootNode) {

            this.uirootNode = uirootNode;

            }

             public boolean isExpandirTree() {

            if (controle)

              return expandirTree;

            else

              return false;

            }

            public void setExpandirTree(boolean expandirTree) {

            this.expandirTree = expandirTree;

            }

           

          hugs