PDA

View Full Version : Move Component



dhayeck
17 Feb 2011, 4:22 PM
I have a component in a container and I need to be able to reorder where it is in said container, or move it to another container through drag and drop. I need all the functionality and events attached to both the JS component and the dom element so I'm fairly sure from experimentation that no cloning or inner html tricks will work. (I did manage to copy all of the html for the child nodes but they lost some of their event handling)

I have tried the following among other things:

owner.remove(dragEl,false);
fails to update the dom

owner.remove(dragEl,true);
updates the dom but destroys the widget completely.

targetCon.insert(0,dragCmp);
updated the item list but failed to update the dom

After each I have also tried targetCon.doLayout(), doLayout(false,true), doLayout(true,true)

Any suggestions or examples that move the entire component and its dom representation, not just transfer its values?