[Extjs6] 使用extraParames参数给Ext.data.Store添加额外的参数
2017-10-06 00:00
423 查看
定义store
注意extraParames参数的使用。Ext.define('Test.store.Contacts', { extend: 'Ext.data.Store', model: 'Test.model.Contact', autoLoad: true, pageSize: 35, autoLoad: {start: 0, limit: 35}, proxy: { type: 'ajax', api: { read : 'Test/view.action', create : 'Test/create.action', update: 'Test/update.action', destroy: 'Test/delete.action' }, extraParams: { ddCode: 0 }, reader: { type: 'json', root: 'data', successProperty: 'success' }, writer: { type: 'json', writeAllFields: true, encode: false, root: 'data' }, listeners: { exception: function(proxy, response, operation){ Ext.MessageBox.show({ title: 'REMOTE EXCEPTION', msg: operation.getError(), icon: Ext.MessageBox.ERROR, buttons: Ext.Msg.OK }); } } } });
修改参数的方法:
//修改参数的值 Xxxx.getStore().getProxy().extraParames.ddCode = value; Xxxx.getStore().load();
相关文章推荐
- [Extjs6] 使用extraParames参数给Ext.data.Store添加额外的参数
- Ext.data.Store添加动态参数
- Ext.data.JsonStore使用HttpProxy加载数据时传递参数的两种方法
- [Extjs6]浅谈Ext.data.Store的使用.
- [Extjs6]浅谈Ext.data.Store的使用.
- ext6.2分页给加额外参数用Ext.data.Store的extraParams
- ExtJs开发教程_001_Ext.data.Store使用方法详解
- [Extjs6] Ext.data.Store&&Ext.data.ArrayStore
- ExtJs6 store发送数据添加参数
- [Extjs6] Ext.data.Store Gridpanel默认选中一些记录
- Ext.data.SimpleStore的使用方法
- Ext.data.SimpleStore的使用方法
- Ext.data.SimpleStore的使用方法
- 如何把Ext.data.store里的数据一次性用JSON传给后台(添加了后台解析部分)
- [Extjs6] Ext.data.Store&&Ext.data.ArrayStore
- ExtJs开发教程_001_Ext.data.Store使用方法详解
- Ext.data.SimpleStore的使用方法
- Ext.data.Store 使用详解 (Extjs 3)
- Extjs学习笔记——Ext.data.JsonStore使用说明
- 使用Ext.net或者ExtJS时,如何在调用Grid.save()或者Store.save()传递更多的参数到后台