ext中ArrayStore,JsonStore,XmlStore的用
来源:互联网 发布:windows文件恢复大师 编辑:程序博客网 时间:2024/06/09 05:55
ext中ArrayStore,JsonStore,XmlStore的用法
1.Store的用法
var _store = new Ext.data.Store();
var _record = new Ext.data.Record(["name","sex"]);
var _recordClone = new Ext.data.Record(["name","sex"]);
_record.set('name','张翔');
_record.set('sex','男');
_store.add(_record);
_recordClone.set('name','李慧敏');
_recordClone.set('sex','女');
_store.add(_recordClone);
//alert(_store.getCount());
//alert(_store.getAt(1).get('sex'));
2.ArrayStore的用法
var _store = new Ext.data.ArrayStore({
data:[{name:'张翔',sex:'男'},{name:'李慧敏',sex:'女'}],
fields:[{name:'name',mapping:'name'},{name:'sex',mapping:'sex'}]
});
alert(_store.getAt(1).get('sex'));
3.JsonStore的用法(和ArrayStore差不多,2.0版本之前 ArrayStore是JsonStore的子类)
var _store = new Ext.data.JsonStore({
data:[{name:'张翔',sex:'男'},{name:'李慧敏',sex:'女'}],
fields:[{name:'name',mapping:'name'},{name:'sex',mapping:'sex'}]
});
alert(_store.getAt(1).get('sex'));
4.XmlStore的用法
var _emp = Ext.data.Record.create([{name:'name',mapping:'name'},{name:'sex',mapping:'sex'}]);
var _store = new Ext.data.XmlStore({
url:'/store/xmlStore.xml',
reader:new Ext.data.XmlReader({
totalRecords:'xml',
record:'emp',
id:'id'
},_emp)
});
_store.load();
alert(_store.getCount());
alert(_store.getAt(1).get('sex'));
- ext中ArrayStore,JsonStore,XmlStore的用
- ext中ArrayStore,JsonStore,XmlStore的用法
- ext中store,ArrayStore,JsonStore,XmlStore的用法
- ExtJs中ArrayStore、SimpleStore、JsonStore、GroupingStore
- ExtJs4用Ext.data.ArrayStore的使用实例
- 玩转extjs5之Ext.data.JsonStore与Ext.data.XmlStore(五)
- EXT的jsonstore使用
- 关于Ext.data.ArrayStore的用法
- Ext.data.JsonStore的用法
- Ext Jsonstore中文字段的实现
- EXT.NET中Store中的JsonStore的配置项中root和totalProperty的作用
- 在Ext的JsonStore的load方法中使用回调callback 修改treeStore 数据
- Ext中JsonStore重新设置url然后加载数据的方法
- ExtJS中grid的JsonStore、Ext.PagingToolbar带条件查询问题
- [Extjs6] Ext.data.Store&&Ext.data.ArrayStore
- ExtJs中同一个URL构造多个Ext.data.JsonStore
- 【读】Ext.data.JsonStore
- 浅谈:Ext.data.JsonStore
- 使用python编写appium用例
- ExtJs中Store简介(秘籍)
- Subsets II
- 利用cmd打开文件
- 《Javascript高级程序设计》第十三章——事件学习笔记(待续)
- ext中ArrayStore,JsonStore,XmlStore的用
- Compiling HTK 3.4 on Mac OS 10.5
- winform网络编程之TcpClient类,TcpListener类和UdpClient类
- 个人写的一个函数,高手勿喷
- ubuntu使用apt-get install 安装程序时候报同样Depends错误
- 阿伦:NBA应重评50大巨星 美记:"热刺"必数人入围
- 【笔试】诺西 测试
- Crystal Report中用于创建条形码图像控件Native Crystal Reports Barcode Generator
- C# HTTP网络常用方法封装