我有一个带有处理程序 onLogin() 的控制器,它在成功登录请求后被调用:
Ext.define('AddressBook.controller.Application', {
extend: 'Ext.app.Controller',
...
onLogin: function(form, record) {
var editButton = this.getEditButton();
if (!this.showContact) {
this.showContact = Ext.create('AddressBook.view.contact.Show');
}
//how to get this store?
var store = getContactsStore();
//how to get the data in the store or should I get the model?
this.showContacts.updateDataProvider(store.array);
// Push the show contact view into the navigation view
this.getMain().push(this.showContact);
},
...
}