I want to retrieve ExtJS component by using class name that is I want the same result when I tried to retrieve element by using id. I can do it by using id but there are some issues occurs when I provide id to my components. Below is one item which present on one page and I want to get it on another page (internally pages are connected) by using class name.
{
ref: 'reasonCodeField',
cls: 'reason-code-field',
xtype: 'enumcombo',
enumName: 'SCH.TrackingEventReasonCodes',
allowBlank: false
}
Now how can I get component by using class name?
You can try to call
Ext.getCmpwith the ID from the DOM element:Two big caveats: