Extjs 继承Ext.data.Store不起作用原因分析及解决


关于这个原因有很多种,我只说下我遇到的
我这样 写Store来复用的

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);
}
});

这个Store写出来之后 是不会起到作用的
因为Ext.data.Store这个类 没有继承component 组件 因此在初始化的时候不会调用initComponet方法的,
因此这里面的配置项也不会加载到Store里面

Extjs Gird 支持中文拼音排序实现代码
scripttype="text/javascript"Ext.data.Store.prototype.applySort=function(){//重载applySortif(this.sortInfo&&!this.remoteSort){vars=this.sortInfo,f=s.field;varst=this.fields.get(f).sortType;varfn=func

Extjs优化(一)删除冗余代码提高运行速度
Extjs本身是一个加载慢的JS框架,这个需要程序员的多去优化,之前说过了JS的打包的优化这次来写写怎么减少冗余代码,也是提高运行速度,包含了1、

ANT 压缩(去掉空格/注释)JS文件可提高js运行速度
1、说明在使用extjs的时候,运行起来比较卡,特别是运行数据和js过多的时候,就会出现卡死的情况,或者等待时间比较长。在解决这个有很多优化方