10 Replies Latest reply on Jan 13, 2011 12:00 PM by caarlos0

    RichTree not being rerendered after upgrading to 3.3.3

    lgrden

      I'm using rich tree to display the content of my drive (folders and files).

      I also have button representation that send ajax request to expand/collapse all nodes and refresh the tree.

       

      In 3.2.2.GA everything worked fine. You can refresh (rerender) the tree.

       

      I'm trying to upgrade to richfaces 3.3.3 final and I'm having some problems.

      As I use the firebug and and I want to refresh the tree I can see that the request is being send.

      I also see that I receive response from the server, but my tree is not being rerendered - I can wait forever.

      My a4j:status logo is spinig indicating the the rerender is being process, but nothing actually happens.

      Any clue why my tree is not being rerendered?

       

      Also what I've noticed:

      If I upgrade to 3.3.1 GA my tree and related buttons works.

      If I upgrade to 3.3.2 SR1 my tree stops working.

       

      My full configuration:

      JBoss AS 4.2.2.GA

      Seam 2.1.1 GA

      Richfaces 3.2.2.GA

        • 1. Re: RichTree not being rerendered after upgrading to 3.3.3
          nbelaevski

          Hi Lukasz,

           

          Please add a4j:log to the page and check if there are any warnings/errors logged.

          • 2. Re: RichTree not being rerendered after upgrading to 3.3.3
            lgrden

            After adding a4j:log i can see in the log:

             

            error[11:22:25,692]: Error parsing XML
            error[11:22:25,692]: Parse Error: XML Parsing Error: not well-formed Location: http://10.0.0.1:8080/myapp/treetest.seam Line Number 54, Column 25: if (!params.ajaxSingle && event.ajaxSingle) { ------------------------^

             

            in the page source I have:

            <script type="text/javascript">(function() {
            var tree = new Tree("todoForm:todoTree", "todoForm:todoTree:input", "ajax",
            {
                 onselect: "",
                 onexpand: "",
                 oncollapse: "",
                 oncontextmenu: ""
            },
            function(event) {
            var params = {'todoForm:todoTree:selectedNode':event.selectedNode} ;
            if (!params.ajaxSingle && event.ajaxSingle) {
            params.ajaxSingle = event.ajaxSingle;
            }
            • 3. Re: RichTree not being rerendered after upgrading to 3.3.3
              lgrden

              I noticed the difference in the javascript between 3.3.1GA and 3.3.3 Final.

               

              3.3.1GA
              function(event) {A4J.AJAX.Submit('_viewRoot','form',event,{'similarityGroupingId':'form:todoTree','parameters':{'form:todoTree:selectedNode':event.selectedNode} ,'actionUrl':'/pcrf/home_policyGraph.seam'} ); return false;                 },

               

              3.3.3Final
              function(event) {var params = {'form:todoTree:selectedNode':event.selectedNode} ; if (!params.ajaxSingle && event.ajaxSingle) { params.ajaxSingle = event.ajaxSingle; } A4J.AJAX.Submit('form',event,{'oncomplete':event.oncomplete,'similarityGroupingId':'form:todoTree','parameters':params} ); return false;                 },

               


              I can see that the difference is :
              if (!params.ajaxSingle && event.ajaxSingle) { params.ajaxSingle = event.ajaxSingle; }

              • 4. Re: RichTree not being rerendered after upgrading to 3.3.3
                lgrden

                class TreeRendererBase method protected String getAjaxScript(FacesContext context, UITree tree)

                • 5. Re: RichTree not being rerendered after upgrading to 3.3.3
                  lgrden

                  After commenting out   protected String getAjaxScript(FacesContext context, UITree tree) { ...           builder.append("if (!params.").append(AjaxRendererUtils.AJAX_SINGLE_PARAMETER_NAME)                      .append(" && event.ajaxSingle) {\n");           builder.append("params.").append(AjaxRendererUtils.AJAX_SINGLE_PARAMETER_NAME).append(" = event.ajaxSingle;\n");           builder.append("}\n"); ..      } in class TreeRendererBase, compiling and using new compiled class the tree problem is no longer an issue.

                  • 6. Re: RichTree not being rerendered after upgrading to 3.3.3
                    nbelaevski

                    Lukasz,

                     

                    Are you using NONE filter parser?

                     

                    Message was edited by: Nick Belaevski

                    • 7. Re: RichTree not being rerendered after upgrading to 3.3.3
                      lgrden

                      part of my web.xml configuration:

                          <context-param>

                              <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>

                              <param-value>NONE</param-value>

                          </context-param>

                          <context-param>

                              <param-name>org.ajax4jsf.xmlparser.NONE</param-name>

                              <param-value>.*</param-value>

                          </context-param>

                      • 8. Re: RichTree not being rerendered after upgrading to 3.3.3
                        nbelaevski

                        So, the problem won't be reproducing if you use NEKO instead of NONE.

                        • 9. Re: RichTree not being rerendered after upgrading to 3.3.3
                          caarlos0

                          i've tried:

                           

                          <context-param>

                                  <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>

                                  <param-value>NEKO</param-value>

                              </context-param>

                              <context-param>

                                  <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>

                                  <param-value>.*</param-value>

                              </context-param>

                           

                          and the error still occurs..

                          • 10. Re: RichTree not being rerendered after upgrading to 3.3.3
                            caarlos0

                            with a4j:log i got:

                             

                            error[15:00:33,061]: Exception on status change:

                            error[15:00:38,812]: Error evaluate oncomplete function undefined

                            error[15:00:38,814]: Exception on status change:

                            error[15:00:47,194]: . Error message: Object #<a klass> has no method '_getDraggableOptions'

                            error[15:00:47,256]: Exception on status change:

                            error[15:00:58,123]: Error evaluate oncomplete function undefined

                            error[15:00:58,125]: Exception on status change: