2 Replies Latest reply on Mar 10, 2011 3:37 AM by miesec

    bad rerendering of rich:tree

    miesec

      Hi, i have a rich:tree and i want to rerender it when click into a button, but when i rerender the tree it doesn't works. The nodes don't expand.

      Can someone help me?? The code is:

       

      <a4j:outputPanel id="panelExternoPalabrasClave">

                  <c:if test="${arbolPalabrasClaveAction.muestraArbol}">

                       <t:panelGrid columns="1" width="99%" columnClasses="alineacionIzq">

                          <a4j:outputPanel id="panelArbolPalabrasClave" >

                          <rich:tree id="arbolPC" switchType="ajax" style="width:300px;"

                                     value="#{arbolPalabrasClaveAction.rootNode}" var="item" nodeFace="simpleNode" immediate="true">

                              <rich:treeNode type="simpleNode" icon="images/gep/topos_menu.gif" iconLeaf="images/gep/topos_submenu.gif">

                                  <h:selectBooleanCheckbox value="#{item.seleccionado}"/>

                                  <h:outputText escape="false" value="#{item.txt}" />

                              </rich:treeNode>

                          </rich:tree>

                          </a4j:outputPanel>

                      </t:panelGrid>

                </c:if>

      </a4j:outputPanel>

       

       

      When i click the button ${arbolPalabrasClaveAction.muestraArbol} returns true and the tree is rendered, but it doesn't works.

       

        • 1. bad rerendering of rich:tree
          codo

          Hello,

           

          I tried your code and when my maneged bean is in SessionScope it works just fine. The problem is when the bean is in RequestScope. In what scope is your managed bean?

          • 2. bad rerendering of rich:tree
            miesec

            Hello,

             

            Thanks for your response. I find the solution. I forgot to put a SaveState of the property  ${arbolPalabrasClaveAction.muestraArbol} into my form, so when I rerender the tree it was imposssible to use it, because my bean is in SessionScope.

             

            Thank you.