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

时间:2013-04-15    点击:108   
关于这个原因有很多种,我只说下我遇到的
我这样 写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里面
JS 模态对话框和非模态对话框操作技巧汇总
jquery获得页面元素的坐标值实现思路及代码
Extjs优化(二)Form表单提交通用实现
Extjs Gird 支持中文拼音排序实现代码
js作用域及作用域链概念理解及使用
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved