1 Reply Latest reply on Jan 31, 2009 3:24 PM by kukeltje.ronald.jbpm.org

    Save state in tree node and switchType problem

    safa

      Hi all,


      I have a dynamic tree node who get his nodes from my database,


      My problem is that the tree collapsed when I reload the page or render to an other page when i click onto a node, but I want the tree is shown in the node that i selected,
      this is my tree:



      <rich:tree 
                          style="width:300px" 
                          rendred="true"
                          switchType="client"
                          var="item"
                          value="#{menu1.treeNode}" 
                          nodeFace="#{item.var!=null ? 'leaf' : 'node'}"
                          ajaxKeys="#{null}"
                          nodeSelectListener="#{menu1.processSelection}"
                          ajaxSubmitSelection="true"
                          reRender="selected">
                          
                          <rich:treeNode type="node"> 
                         <s:link view="/#{item.list}.xhtml" 
                                        value="#{item.label}" 
                                        ajaxSubmitSelection="true">
                            </s:link>
                      </rich:treeNode>
                      
                          <rich:treeNode type="leaf" id="leaf"> 
                          <s:link view="/#{item.list}.xhtml"
                                        value="#{item.label}" 
                                        ajaxSubmitSelection="true">
                                <f:param id="selected" name="aireProtegeeId" 
                                        value="#{item.id}" />
                                        
                            </s:link>
                            
                      </rich:treeNode>
                      
                     </rich:tree>




      Do any one have an idea how to use  the componentState attribut of the tree???


      An other question: in this tree i use the


      switchType="client"



      but I when i would like to use the ajax type (which i have to use, an may be resolve my first problem) the tree would not expend and the nodes want be shown???


      I will be greatfull for any suggestions.


      thxxx