1

我有一个带有处理程序 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);
},
...
}
4

1 回答 1

3

试试这个代码

Ext.getStore('storeId')

它会给你商店的对象

于 2012-09-24T10:21:47.177 回答