Let’s suppose I have this this simple button:
{
xtype :'button',
text :'button',
id:'address'+counter.no,
handler : function() {}
}
How can I get access to the current button and get access to its properties such as name, id, etc?
I’m aware of Ext.getCmp('compid') but I need to get access to CURRENT button, and I don’t know its id.
Do you mean inside the handler function?
See docs at description for
handler.As first parameter
thisbutton object is passed, so you could do the following: