Ext,DirectStore ,读取ashx返回的值,一直处于loading,不能正确加载
conbing
2014-03-03
部分代码:
Ext.define('App.Test.Panel', { extend: 'App.centerTab.Panel', constructor: function (config) { var me = this; Ext.apply(me, { items: [{ xtype: 'grid', title: '简单测试', width: 300, height: 200, columns: [{ header: '名称', datIndex: '111', width: 80 }, { header: '描述', dataIndex: '222', width: 200}], store: Ext.create('App.Test.Store', {}) }], title: '测试' }); this.callParent(arguments); me.down('grid').store.load(function () { var a = arguments; } ); var a = 0; } }); Ext.define('Model', { extend:'Ext.data.Model', fields: [{ name: "LicId", type: 'int' }, { name: "LicName", type: 'string' }, { name: "LicObject", type: 'string'}] }); Ext.define('App.Test.Store', { extend: 'Ext.data.Store', model:'Model', proxy: { type: 'direct', api: { create: App.TestAction.Insert, read: App.TestAction.SelectAll, update: App.TestAction.Update, destory: App.TestAction.Delete }, reader: { type: 'json', root: 'rows', idProperty: 'LicId', totalProperty: 'count', successProperty: 'success' } }, writer:writer }); Ext.direct.Manager.addProvider({ type: 'remoting', url: 'DataManager/DataManager.ashx', actions: { TestAction: [{ name: 'SelectAll', params: ['id', 'name', 'memonic'] }, { name: 'Update', params: ['id', 'data'] }, { name: 'Insert', params: ['id', 'data'] }, { name: 'Delete', params: ['data']}] }, enableBuffer:true, namespace: 'App' }); =================== 后台返回数据格式 {"count":30,"rows":[{"LicId":0,"LicName":"0号","LicObject":"qse"},{"LicId":1,"LicName":"1号","LicObject":"qse"},{"LicId":2,"LicName":"2号","LicObject":"qse"},{"LicId":3,"LicName":"3号","LicObject":"qse"},{"LicId":4,"LicName":"4号","LicObject":"qse"},{"LicId":5,"LicName":"5号","LicObject":"qse"},{"LicId":6,"LicName":"6号","LicObject":"qse"},{"LicId":7,"LicName":"7号","LicObject":"qse"},{"LicId":8,"LicName":"8号","LicObject":"qse"},{"LicId":9,"LicName":"9号","LicObject":"qse"},{"LicId":10,"LicName":"10号","LicObject":"qse"},{"LicId":11,"LicName":"11号","LicObject":"qse"},{"LicId":12,"LicName":"12号","LicObject":"qse"},{"LicId":13,"LicName":"13号","LicObject":"qse"},{"LicId":14,"LicName":"14号","LicObject":"qse"},{"LicId":15,"LicName":"15号","LicObject":"qse"},{"LicId":16,"LicName":"16号","LicObject":"qse"},{"LicId":17,"LicName":"17号","LicObject":"qse"},{"LicId":18,"LicName":"18号","LicObject":"qse"},{"LicId":19,"LicName":"19号","LicObject":"qse"},{"LicId":20,"LicName":"20号","LicObject":"qse"},{"LicId":21,"LicName":"21号","LicObject":"qse"},{"LicId":22,"LicName":"22号","LicObject":"qse"},{"LicId":23,"LicName":"23号","LicObject":"qse"},{"LicId":24,"LicName":"24号","LicObject":"qse"},{"LicId":25,"LicName":"25号","LicObject":"qse"},{"LicId":26,"LicName":"26号","LicObject":"qse"},{"LicId":27,"LicName":"27号","LicObject":"qse"},{"LicId":28,"LicName":"28号","LicObject":"qse"},{"LicId":29,"LicName":"29号","LicObject":"qse"}],"success":true} 数据返回到前台,但是grid一直处于加载状态,也未触发store的callback事件。。不知道是什么问题,感觉很二 |
|
conbing
2014-03-04
已解决,结贴。
|
相关讨论
相关资源推荐
- class 文件java字节码Oolong反编译分析
- java 获取文件的字节数_如何获取文件的大小(以字节为单位)?(How to get a file's size in bytes?)...
- Java虚拟机(JVM) - 字节码
- Java字节码
- java int转2字节整数_java – 将4个字节转换为int
- c语言结构体变量所占字节计算,【C语言】结构体占用字节数及存储与空间分配...
- Java字节序,java整型数与网络字节序 byte[] 数组转换关系
- java将字节数组和文件之间互相转换
- Java new一个Object()到底占用多少个字节?
- Java基本数据类型默认值、取值范围及所占字节位数