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 = this.map[oldkey]; var index = this.indexOfKey(oldkey); this.keys[index] = newkey; this.map[newkey] = comp; delete this.map[oldkey]; }; Is there anything really wrong with this approach?