Extjs inheritance Ext. data. Store does not work Cause Analysis and Solution _ extjs

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.