R – Flex: extract data from a Tree control

apache-flextreexml

So Flex provides great APIs for user-manipulation of its data-fed controls, but, for the life of me, I can't figure out how to get the data back out of the control once the user is done playing with it. Specifically, I've enabled the dragMove controls on a Tree component, but I can't figure out how to get the user-initiated changes back into XML data that I can write back to the db.

When the user reorders the Tree, no change is registered in the dataProvider, and if the dataDescriptor is registering these changes, I don't know how to get the data back out. The dataDescriptor method getData() calls for a node parameter….which node? The node from its own dataProvider?? I don't get it. Any ideas?

Best Answer

I believe what you have to do is listen to the dragOver event and manipulate the resulting data in that handler. Drag drops support is mainly for transferring from one list control to another control.

Related Topic