4 Replies Latest reply on Jul 24, 2007 1:11 PM by Nilesh Bhattad

    Problem with drag'n'drop in tree component

    Alexander Belov Novice

      Good day!

      I have some problems with treeComponent. I want to use drag'n'drop in it.

      Here is my page code:

      <rich:tree value="#{treeBean.data}" nodeFace="#{treeValue.type}" var="treeValue" id="treeSelect" switchMode="client" dragIndicator="dragIndicator" acceptedTypes="treeDrag" ajaxSubmitSelection="true" selectListener="#{treeBean.selectListener}" binding="#{treeBean.tableComponent}" reRender="#{treeBean.treeSelectUpdate}">
       <rich:treeNode type="root" dropType="rootDrop" reRender="pageDiv" dropListener="#{treeBean.dropListener}">
       <h:outputText value="#{treeValue.value}"/>
       </rich:treeNode>
       <rich:treeNode type="data" dragType="treeDrag" reRender="pageDiv" dropType="treeDrop" dropListener="#{treeBean.dropListener}">
       <rich:dndParam type="drag" name="label" value="#{treeValue.value}"/>
       <h:outputLabel value="#{treeValue.value}"/>
       </rich:treeNode>
      </rich:tree>
      


      First problem: after dropping the page is not updated. I tryed many various settings - but I have to slick on the node after drag'n'drop to update the tree.

      Second problem: there are many javascript errors while working with drag'n'drop. Event ondrop doesn't work at all (but it is very useful for me).

      Third problem: I should select the node which I want to drag before drag'n'drop. I cannot drag it another way, because javascript errors are occured.

      I use the latest snapshot of ajax4jsf and RichFaces 3.0.2 Snapshot 16 from 19 June. JSF 1.2 RI, Glassfish server.