0 Replies Latest reply on Mar 5, 2008 4:38 AM by vladoseprak

    Two trees - one is not expanding

    vladoseprak

      Hi,

      I have strange problem with tree component. I have two tree components on one page, bun when i set switch type to something else than client, the second one is not expanding. Both trees have different back beans (different classes but same functionality) and different id-s.

      <h:form id="commonForm">
       <rich:tree id="tree"
       switchType="ajax"
      
       componentState="#{menu.componentState}"
       nodeSelectListener="#{menu.onSelect}"
       immediate="false"
       >
       <rich:recursiveTreeNodesAdaptor
       id="recursiveAdaptor"
       nodes="#{nodeRecursive.childs}"
       roots="#{menu.root.childs}"
       var="nodeRecursive">
       <rich:treeNode id="testNode" >
       <h:commandLink
       action="#{nodeRecursive.processViewPage}"
       actionListener="#{nodeRecursive.processDeleteAction}">
       #{nodeRecursive.name}
       </h:commandLink>
       <h:commandLink
       rendered="#{nodeRecursive.createAction}"
       action="#{nodeRecursive.processCreatePage}"
       actionListener="#{nodeRecursive.processCreateAction}"
       >+</h:commandLink>
       <h:commandLink
       rendered="#{nodeRecursive.deleteAction}"
       action="#{nodeRecursive.processDeletePage}"
       actionListener="#{nodeRecursive.processDeleteAction}"
       >-</h:commandLink>
       </rich:treeNode>
       </rich:recursiveTreeNodesAdaptor>
      
       </rich:tree>
      
      
       </h:form>
      


      On second tree i have changed id of tree, recursiveTreeNodesAdaptor and treeNode to differ from first ones. Both trees work fine on their own but when they are together on same page the second one is not expanding. Thanks for every logical explanation.