1 Reply Latest reply on Mar 18, 2009 10:00 AM by Romain Wilbert

    [Tree] dropListener not triggered

    Romain Wilbert Newbie

      Hi,

      I am using the drag & drop capability in my tree but dropListener never get triggered on drop event.

      Here is my code :

      <h:form id="f">
       <rich:dragIndicator id="treeDragIndicator" />
       <h:panelGrid columns="2" width="100%" styleClass="vertical-align-top">
       <rich:panel>
       <f:facet name="header">#{repL.hierarchieReseau}</f:facet>
       <rich:tree
       id="cnpReseau"
       switchType="client"
       ajaxSubmitSelection="true"
       nodeSelectListener="#{gererDelegueRegionalEBP.searchBT.selectRegroupement}"
       selectedClass="selectedNode"
       ajaxSingle="true"
       dropListener="#{gererDelegueRegionalEBP.searchBT.dropListener}"
       toggleOnClick="true"
       dragIndicator="treeDragIndicator"
       adviseNodeSelected="#{gererDelegueRegionalEBP.searchBT.isNodeSelected}"
       adviseNodeOpened="#{gererDelegueRegionalEBP.searchBT.isNodeSelected}"
       reRender="detail,ident">
       <rich:treeNodesAdaptor nodes="#{gererDelegueRegionalEBP.searchBT.regroupements}" var="regroupement">
       <rich:treeNode acceptedTypes="delegueRegional" dropValue="#{regroupement}">
       #{regroupement.nom}<h:outputText value=" (#{regroupement.responsable.fullName})" rendered="#{regroupement.responsable != null}"/>
       </rich:treeNode>
       <rich:treeNodesAdaptor nodes="#{regroupement.deleguesRegionaux}" var="delegue">
       <rich:treeNode icon="/img/icons/user_suit.png"
       iconLeaf="/img/icons/user_suit.png"
       dragType="delegueRegional"
       dragValue="#{delegue}">
       #{delegue.fullName}
       <rich:dndParam name="label" value="#{delegue.fullName}" />
       </rich:treeNode>
       </rich:treeNodesAdaptor>
       </rich:treeNodesAdaptor>
       </rich:tree>
       </rich:panel>


      I also tried to put a <rich:dropSupport> into my "regroupement" treeNode element but i have the same problem.

      Could it be caused by the use of a treeNodeAdaptor ? Do i have to put the tree in a a4j:region ?

      Thank you