View Full Version : cloning an object - deep copy, not reference

20 Sep 2010, 9:24 PM
hi, is there an ExtJS way of creating a deep-copy of a component? i don't think i can use Component.cloneConfig as it will only create another component with the same configuration, not the exact same object, in this case my panel contains grid with data from a loaded xmlstore. i don't want my grid inside the panel to reload.
Basically, what I want is ADEEPCOPYFUNCTION

var myPanel = Ext.get('myPanelId');
var myPanelCopy = ADEEPCOPYFUNCTION(myPanel);

var tabContainer = Ext.get('myTabContainerId');

tabContainer.appendChild(myPanelCopy); //as if the original myPanel was never removed from the DOM / or as if myPanel was hidden then shown.

thanks again.