I have a web service returning an e4x resultformat. Applied to the
tree control the object type of a node becomes
a "XMLTreeDataProvider" data type.
Now Flex 2.0 allows us to drag and drop the nodes just fine but the
operation only correctly updates the datasource not the tree? IOW
Everything except the tree visuals are being updated properly. The
node added is always at the end of the tree node list for the folder
you drag into, not at the location the datasources show which is
correct.
Please, it's been 2 day's off and on what the heck am I missing here??
If I return an object structure from the web service, all works fine.
However I have to go through and convert that for saving server side
back to the web service. I would really like to get a handle on this.
Any insight, help, tips, pointers, examples?
Thanks,
See below code.
private function doDragDrop(event:DragEvent):Void {
private var items:Array = event.dragSource.dataForFormat("treeItems");
private var dropLoc:int = event.currentTarget.getDropLocation(event);
var dropparent:Object = event.currentTarget.getDropParent(event);
items.reverse();
var l:int = items.length;
for(var i:int = 0; i < l; i++) {
dropparent.addTreeNodeAt(dropLoc,items[i]);
}
//data is updated here
//trace(dropparent.getNodeData().toString());
//Data is updated here
//trace(dataSrc.getNodeData().toString());
//Data is updated here
//trace(Tree0.getDropParent(event).getNodeData().toString());
//Data is updated here
//trace(Tree0.getTreeNodeAt(0).getNodeData().toString());
}
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/