2 Replies Latest reply on Jul 3, 2007 3:11 PM by dwheeler

    Drag & Drop Tree

    dwheeler

      I'm currently in the process of testing out some of the examples for the components available in RichFaces. While I was able to get the tree example working, I'm a little confused as to how I add drag and drop functionality to it. For example, if I wanted to be able to drag songs to different albums in the example, http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree, what would I need to add to the tree structure and to the backing beans? Thank you in advance.

        • 1. Re: Drag & Drop Tree
          nbelaevski

          The following attributes are required:
          dragType - symbolic name for "class" of objects being dragged, eg. 'song'
          acceptedTypes - list of drag types this dropzone can accept delimited by commas, eg. 'song, movie, lyrics'.
          dragListener & dropListener - bindings for methods that are called as a result of DnD action.

          Theese attributes can be set either on tree (affects all nodes) or on treeNode (overriding if that attribute has been set on tree or defining if not).

          • 2. Re: Drag & Drop Tree
            dwheeler

            Thank you for your quick reply. Could you please give me an example of the two methods that would handle the drag and drop operations in the backing bean?