Chinaunix首页 | 论坛 | 博客
  • 博客访问: 182988
  • 博文数量: 92
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1413
  • 用 户 组: 普通用户
  • 注册时间: 2013-02-04 21:12
文章分类
文章存档

2013年(92)

我的朋友

分类: 信息化

2013-04-15 02:37:07

? 关于这个缘由有很多种,我只说下我遇到的 我这样 写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里面  
阅读(854) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~