You could define action
for your button and handle the event in the controller using the control
method that allows you to map handlers to components selected with the component query:
// view
Ext.define('Example.user.Edit', {
extend: 'Ext.window.Window',
alias: 'widget.useredit',
buttons: [{
text: 'Submit',
margin: '0 100 0 0',
formBind: true,
action: 'add'
}];
// controller:
Ext.define('Example.controller.User', {
extend: 'Ext.app.Controller',
init: function () {
this.control({
'useredit button[action=add]': {
click : this.addUser
}
});
} ...
Source:
http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.app.Controller-method-control