I use the MVC-architecture in Extjs application. I have a simply button, it looks like a:
{
xtype: 'button',
id: 'searchButton',
margin: '5 0',
text: 'Search'
}
And how I can press it button programmatically from this view?
I think imitate button-click from view it is a not good solution. If you use a MVC-architecture you may do it from Controller. And you may fire events, because your solution is bad way. But if you still want do it, this code I think will be helpful for you:
Ext.get('searchButton').dom.click();
And please read this article in official site EXTjs MVC-architecture