6 Replies Latest reply on May 23, 2008 7:44 AM by ilya_shaikovsky

    just a simple tree with richfaces -urgent-

    ice_casa

      please it s so urgent to resolve a small problem,
      i had implement richfaces it s seems work good. i would like to implemented a static tree :
      my jsf page is :


      <h:form >
      <rich:tree>
      <rich:treeNode >
      <h:outputText value="client1" />
      </rich:treeNode>
      <rich:treeNode >
      <h:outputText value="client2" />
      </rich:treeNode>
      <rich:treeNode >
      <h:outputText value="client3" />
      </rich:treeNode>
      </rich:tree>
      </h:form>

      why it display no thing.
      thx for advance

        • 1. Re: just a simple tree with richfaces -urgent-
          ice_casa

          a source code of my jsf is :


          <div class="dr-tree rich-tree " id="j_id75:j_id76" xmlns:rich="http://richfaces.ajax4jsf.org/rich">
          //<![CDATA[
          var Richfaces_Tree_j_id75_j_id76 =
          new Tree("j_id75:j_id76", "j_id75:j_id76:input", "ajax",
          {
          onselect: "",
          onexpand: "",
          oncollapse: ""
          },
          function(event) {
          A4J.AJAX.Submit('_viewRoot','j_id75',event,{'parameters':{'j_id75:j_id76:selectedNode':event.selectedNode} ,'actionUrl':'/workflow-dsvc/sa/home.jsf'} ); return false;
          },
          false,
          true
          );
          Richfaces_Tree_j_id75_j_id76.drop = function(event,drag){var options = {'parameters':{'j_id75:j_id76':'j_id75:j_id76'} ,'actionUrl':'/workflow-dsvc/sa/home.jsf'} ;options.parameters['dropTargetId'] = 'j_id75:j_id76';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','j_id75',event,options);};
          //]]>
          client4


          u have an idea?

          • 2. Re: just a simple tree with richfaces -urgent-
            ice_casa

            sorry my code is :




            <div class="dr-tree rich-tree " id="j_id75:j_id76" xmlns:rich="http://richfaces.ajax4jsf.org/rich">
            //<![CDATA[
            var Richfaces_Tree_j_id75_j_id76 =
            new Tree("j_id75:j_id76", "j_id75:j_id76:input", "ajax",
            {
            onselect: "",
            onexpand: "",
            oncollapse: ""
            },
            function(event) {
            A4J.AJAX.Submit('_viewRoot','j_id75',event,{'parameters':{'j_id75:j_id76:selectedNode':event.selectedNode} ,'actionUrl':'/workflow-dsvc/sa/home.jsf'} ); return false;
            },
            false,
            true
            );
            Richfaces_Tree_j_id75_j_id76.drop = function(event,drag){var options = {'parameters':{'j_id75:j_id76':'j_id75:j_id76'} ,'actionUrl':'/workflow-dsvc/sa/home.jsf'} ;options.parameters['dropTargetId'] = 'j_id75:j_id76';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','j_id75',event,options);};
            //]]>
            client4


            can you have an idea?

            • 3. Re: just a simple tree with richfaces -urgent-
              ice_casa

               

              "ice_casa" wrote:
              sorry my code is :


              <form id="j_id75" name="j_id75" method="post" action="/workflow-dsvc/sa/home.jsf" enctype="application/x-www-form-urlencoded">
              <input type="hidden" name="j_id75" value="j_id75" />
              <div class="dr-tree rich-tree " id="j_id75:j_id76" xmlns:rich="http://richfaces.ajax4jsf.org/rich"><input type="hidden" id="j_id75:j_id76:input" name="j_id75:j_id76:input" value="" /><script type="text/javascript">
              //<![CDATA[
              var Richfaces_Tree_j_id75_j_id76 =
               new Tree("j_id75:j_id76", "j_id75:j_id76:input", "ajax",
               {
               onselect: "",
               onexpand: "",
               oncollapse: ""
               },
               function(event) {
               A4J.AJAX.Submit('_viewRoot','j_id75',event,{'parameters':{'j_id75:j_id76:selectedNode':event.selectedNode} ,'actionUrl':'/workflow-dsvc/sa/home.jsf'} ); return false;
               },
               false,
               true
               );
               Richfaces_Tree_j_id75_j_id76.drop = function(event,drag){var options = {'parameters':{'j_id75:j_id76':'j_id75:j_id76'} ,'actionUrl':'/workflow-dsvc/sa/home.jsf'} ;options.parameters['dropTargetId'] = 'j_id75:j_id76';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','j_id75',event,options);};
              //]]>
              </script><div id="j_id75:j_id76:script"><script type="text/javascript"></script></div></div>client4<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1" />
              </form>
              

              can you have an idea?


              • 4. Re: just a simple tree with richfaces -urgent-
                ilya_shaikovsky

                No, tree can't be used in this way. You may use PanelMenu in order to create static tree

                • 5. Re: just a simple tree with richfaces -urgent-
                  ice_casa

                  can i have a simple exemple?
                  tnx

                  • 6. Re: just a simple tree with richfaces -urgent-
                    ilya_shaikovsky

                    livedemo