Ext.button click() method

s.webbandit picture s.webbandit · Aug 11, 2012 · Viewed 43.2k times · Source

ExtJS 4.1.

Is there something like Ext.button.click(); method on Ext.button class?

Is it possible to programmically "click" a button with one method?

Answer

Johan Haest picture Johan Haest · Aug 13, 2012

Or if you have an MVC structure you can fire the click event of the button, and if you're listening to the event in your controller and have an associated function it will get called.

button.fireEvent('click', button);