dimanche 6 juillet 2014

Uncaught TypeError: undefined is not a function while Store loading

I have a store

Code:



Ext.define('MyApp.store.Users', {
extend: 'Ext.data.Store',
id: 'UsersStore',
requires: [
'MyApp.model.Users'
],
config: {
model: 'MyApp.model.Users',
sorters: 'lastName',
proxy: {
type: 'ajax',
url: '/users.json',
extraParams: {
},
reader: {
type: 'json',
rootProperty: 'items'
}
},
autoLoad: false
}
});

I'm trying to create and load it

Code:



Ext.create('MyApp.store.Users');
var a = Ext.getStore('UsersStore').getProxy().load({
});

And in load() I receiving message:

Uncaught TypeError: undefined is not a function


I don't know what a reason of this problem and how I can to solve it.





Aucun commentaire:

Enregistrer un commentaire