ExtJS MVC: refs vs widget
привет всем.
Есть отдельный view
LogPanelView.js
Код:
alias: 'widget.logPanelView'
в котроллере есть
Код:
refs: [
{
ref: 'importerXml',
selector: 'importerXmlView' //основной view
},
{
ref: 'logPanel',
selector: 'logPanelView',
autoCreate: true
}
]
init: function() {
this.control({
'importerXmlView button[action=submit]': {
click: this.submitFormUpload
}
});
},
submitFormUpload: function() {
var mainView= this.getImporterXml();
var new = this.getLogPanel();
mainView.add(new); // так не работает
mainView.add({xtype: 'logPanelView'}); // а вот так работает
}
что не так делаю? притом что this.getImporterXml() и this.getLogPanel() оба возвращают обьект.
заранее спасибо.
|