Most of the time i see the following Warning, when i click on the same button for more than once (when calling the same function twice or more)
[WARN] [WARN]
[WARN][Ext.Component#constructor] Registering a component with a id (
name
) which has already been used. Please ensure the existing component has been destroyed (Ext.Component#destroy()
.
Warning states that you are creating and destroying the component with id:name
too fast. So, I would suggest you to remove the hard-coded id
property on that component and instead use itemId
.
Why to use itemId
over id
?
An itemId can be used as an alternative way to get a reference to a component when no object reference is available. Instead of using an id with Ext.getCmp, use itemId with Ext.Container.getComponent which will retrieve itemId's or id's. Since itemId's are an index to the container's internal MixedCollection, the itemId is scoped locally to the container - avoiding potential conflicts with Ext.ComponentManager which requires a unique id.