Extjs inherits Ext. data. there are many reasons why the Store does not work. Next I will share with you what I have encountered. This Store will not work after it is written, if you are interested, you can refer to the detailed reasons and solutions. There are many reasons for this. I just want to talk about what I met.
I wrote the Store for reuse.
The Code is as follows:
DocStore = Ext. extend (Ext. data. Store ,{
InitComponent: function (){
This. proxy = new Ext. data. HttpProxy ({url: this. url });
This. reader = new Ext. data. JsonReader (
{
TotalProperty: 'results ',
Root: 'rows ',
Id: 'docid ',
Fields: ['docid', 'extension', 'cname', 'author', 'sizes', 'datecreated ']
}
);
This. sortInfo = {field: 'datecreated ', ction: 'desc '};
This. remoteSort = false;
DocStore. superclass. initComponent. call (this );
}
});
This Store will not work after it is written.
Because the Ext. data. Store class does not inherit the component, the initComponet method will not be called during initialization,
Therefore, the configuration items are not loaded into the Store.