5 Replies Latest reply on Dec 2, 2010 4:25 PM by nehmesis

    Tree doesn't rerender

    nehmesis Newbie

      Hello everybody,

       

      I have problem with tree component. I build my tree dynamically (add node after clicking on a command button) and the problem is that the tree doesn't rerender after clicking. Of course I am using AJAX.

       

      page.xhtml

       

      <ui:define name="body">
          <h:panelGrid columns="1" id="leftPanel">
              <h:panelGroup>
                  <a4j:commandButton action="#{treeBuilder.add}" value="+" reRender="tree"/>
                  <a4j:commandButton action="#{treeBuilder.delete}" value="-" reRender="tree"/> 
                  <a4j:commandButton action="#{treeBuilder.moveUp}" value="up" reRender="tree"/>
                  <a4j:commandButton action="#{treeBuilder.moveDown}" value="down" reRender="tree" /> 
              </h:panelGroup>
              <a4j:outputPanel id="tree">
                  <rich:tree switchType="ajax" value="#{treeBuilder.root}" nodeSelectListener="#{treeBuilder.processSelection}" ajaxSubmitSelection="true" var="node" ajaxKeys="#{null}" />
              </a4j:outputPanel>
           </h:panelGrid>
      </ui:define>
      

      That all is inside <h:form> ... </h:form>.

       

      Thanks for help.