Reason analysis and solution of Extjs inheritance Ext.data.Store not function _extjs

Source: Internet
Author: User
Tags inheritance
There are many kinds of reasons for this, I just say I met
I'm writing store-and-rifle.
Copy Code code 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 ', ' extention ', ' docname ', ' author ', ' Sizes ', ' datecreated ']
}

);
This.sortinfo = {field: ' DateCreated ', direction: ' DESC '};
This.remotesort = false;
DocStore.superclass.initComponent.call (this);
}
});

It's not going to work when it's written in the store.
Because the Ext.data.Store class does not inherit the component component and therefore does not invoke the Initcomponet method at initialization time,
So 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.