I am working with a tree component that is being used to display test
documents that are in various folders on my server. What I am trying to
work out is moving one document from one node to another node. When the
drag is complete it sends data to my cfc that then moves the document on
the server to the new destination folder.

Right now my tree looks like this.

Root Folder (transaction file number, not important, just used to show
file structure)
      Folder 1
           Item 1
      Folder 2
           Item 1
etc...

I color coded the folders to show that they are both under the root
directory and not Folder 2 inside of Folder 1

The data I pass from my flex front end to my cfc is this.

Source UUID (unique ID of the folder on the server)
Destination UUID (unique ID of the folder on the server)
File (the file I need to move)
Transaction UUID (unique transaction folder ID on the server)

Folder 1, and Folder 2 both have the data attribute. The data attribute
holds the folders UUID.

So this is where I am at this point. I have all the required classes I
use in an external include file that I import.


     public var sourceUUID:Object;
     public var destUUID:Object;
     public var destFile:String;

// move doc handler
         private function moveDocHandler():void{
             moveDocs(sourceUUID.data, destUUID.data, destFile,
mainStage[stateID].uuid.text)
             Alert.show(sourceUUID.data.toString(), "SOurce UUID")
             Alert.show(destUUID.data.toString(), "Dest UUID")
             Alert.show(destFile, "File Name")
             Alert.show(mainStage[stateID].uuid.text, "Trans UUID")
         }

         private function onDragStart(event:DragEvent):void{
             sourceUUID = docTree.getParentItem(docTree.selectedItem)

         }

         private function onDragEnd(event:DragEvent):void{
             destUUID = docTree.getParentItem(docTree.dropTarget);
             destFile = docTree.selectedItem.label;
moveDocHandler()

         }

I have set
dragEnter="onDragStart(event)"
and
dragComplete="onDragEnd(event)"

Ok now the problem. When I drag the file from the Source node, to the
Destination node, the vars sourceUUID and destUUID, both contain the
same value. So how do I get the data from my destination node. I can get
the data from the source node easily with the code I provided, I am just
not able to get the destination node uuid.

Any help with this would be greatly appreciated.

Reply via email to