Hi,
I have an application with 2 controllers. THe main controller and a second which shall manage a ChangePassword view.
The ChangePassword controller has a funtion show which shows the ChangePassword window - the view.
this.getController('ChangePassword').show();
This works fine. The problem is that onChangePasswordButtonClick is never called when I click the button. I think I have done something wrong with the controller or the view or both. What's the problem here?
Code:
Ext.define('Foo.controller.ChangePassword', {
extend: 'Ext.app.Controller',
views: [
'ChangePassword'
],
onChangePasswordButtonClick: function(button, e, options) {
alert('M');
},
show: function() {
this.v.show();
},
init: function(application) {
this.control({
"button[id='btnChangePassword']": {
click: this.onChangePasswordButtonClick
}
});
this.v = this.getChangePasswordView().create();
}
});