Change ID of a Component in ExtJS

ExtJS: The Component manager instance’s all collection does not let you change an ID of a component. Let’s say… you wanted to, anyway. Add this: Ext.ComponentMgr.all.changeKey = function(oldkey, newkey) { var comp =[oldkey]; var index = this.indexOfKey(oldkey); this.keys[index] = newkey;[newkey] = comp; delete[oldkey]; }; Is there anything really wrong with this approach?