1 Reply Latest reply on Jan 25, 2008 5:50 PM by titou09

    Help! h:commandLink inside 2 levels of rich:treeNodesAdaptor

    titou09

      The following code

      <rich:tree switchType="client" >
       <rich:treeNodesAdaptor id="a" var="itemNodeFamille" nodes="#{echeancierCtrl.listeNodesFamille}" >
       <rich:treeNode>
       <h:commandLink id="b" action="#{echeancierCtrl.consulter2}" value="#{itemNodeFamille.famille.code}"/>
       </rich:treeNode>
       <rich:treeNodesAdaptor id="c" var="itemNodeTypePromotion" nodes="#{itemNodeFamille.listeNodesTypePromotion}" >
       <rich:treeNode>
       <h:commandLink id="d" action="#{echeancierCtrl.consulter3}" value="#{itemNodeTypePromotion.typePromotion.description}"/>
       </rich:treeNode>
       </rich:treeNodesAdaptor>
       </rich:treeNodesAdaptor>
      </rich:tree>
      

      Displays the follwing list:
      A
       A1
       A2
      B
       B1
       B2
       B3
      

      When I click (once!) on any of the "child" elements (either A1,A2, B1,B2, B3), the "#{echeancierCtrl.consulter3}" ils called 5 times, once for any of the child element.
      WHen I click on any of the "parent" element (either A or B), the "#{echeancierCtrl.consulter2}" method is correctly called only once.
      is this a bug? is this a coding problem?
      HELP!!
      (Tested with latest 3.1.4 and 3.20 snapshots)