0
我是新的Extjs用戶我定義了控制器裏面的導航,但不工作。請幫忙。Extjs控制器定義裏面的導航
Ext.define('MyApp.controller.Navigation', {
extend: 'Ext.app.Controller',
alias: 'widget.navigationController',
views: ['Navigation'],
refs : [{
ref: 'navigationView',
selector: 'navigation'
}],
init: function(application){
console.log('controller init');
this.control({
'navigation': {
'golocale': this.goLocale,
'gobrand': this.goBrand,
'gosize': this.goSize,
'goarticle': this.goArticle,
'gogender': this.goGender,
'goprofile': this.goProfile,
scope: this
}
});
},
goLocale: function(link){
console.log('locale clicked');
console.dir(link);
},
goBrand: function(link){
console.log('brand clicked');
// Also tried:
// var viewport = this.getView('Viewport').create();
var viewport = link.up('viewport');
console.dir(viewport);
},
控制檯錯誤波紋管
MyApp.controller.Navigation.addListener(): The specified callback function is undefined
其他方法在哪裏? 'goSize','goArticle'等?這可能是爲什麼它拋出異常。 –