salomo
21 Nov 2011, 9:52 AM
In a Controller this code works:
init: function() {
this.control({
'contentview button[action=goBack]': {
click: this.handleButtonClick
},
'contentview button[action=goNext]': {
click: this.handleButtonClick
}
});
}
With contentview beeing a Panel with a Toolbar and 2 buttons.
The following code in another Controller fails for the second view. Only events for the first view work:
init: function() {
this.control({
'menutree': {itemclick: this.handleMenuClick}
},
{
'navigationtabs': {tabchange: this.handleTabChange}
});
}
In the example above, 'menu tree' works. When putting 'navigation tabs' before 'menutree', 'navigation tabs' works.
Both events work when I write the code like this:
init: function() {
this.control({
'menutree': {itemclick: this.handleMenuClick}
});
this.control({
'navigationtabs': {tabchange: this.handleTabChange}
});
}
Is there a restriction on not using different views within one Controller.control() call?
I'm using Ext JS 4.0.6
Thanks for your help.
Johannes
init: function() {
this.control({
'contentview button[action=goBack]': {
click: this.handleButtonClick
},
'contentview button[action=goNext]': {
click: this.handleButtonClick
}
});
}
With contentview beeing a Panel with a Toolbar and 2 buttons.
The following code in another Controller fails for the second view. Only events for the first view work:
init: function() {
this.control({
'menutree': {itemclick: this.handleMenuClick}
},
{
'navigationtabs': {tabchange: this.handleTabChange}
});
}
In the example above, 'menu tree' works. When putting 'navigation tabs' before 'menutree', 'navigation tabs' works.
Both events work when I write the code like this:
init: function() {
this.control({
'menutree': {itemclick: this.handleMenuClick}
});
this.control({
'navigationtabs': {tabchange: this.handleTabChange}
});
}
Is there a restriction on not using different views within one Controller.control() call?
I'm using Ext JS 4.0.6
Thanks for your help.
Johannes