Extjs4 使用store的post方法
2013-05-27 10:51
106 查看
Extjs4 使用store的post方法需要修改actionmathods
You have to override actionMethod property
or define your own proxy class
Disclaimer: code was written from scratch and not really tested. Please do not downvote if it does not work, before not get replay on your comment. Thanks.
You have to override actionMethod property
Ext.define('Sencha.store.Teams', { extend: 'Ext.data.Store', config: { model: 'Sencha.model.Team', autoLoad: true, proxy: { type: 'ajax', actionMethods: { create : 'POST', read : 'POST', // by default GET update : 'POST', destroy: 'POST' }, url: 'teams.json' } } });
or define your own proxy class
Ext.define('Sencha.data.PostAjax', { extend: 'Ext.data.proxy.Ajax', alias: 'proxy.postproxy', // must to get string reference config: { actionMethods: { create : 'POST', read : 'POST', // by default GET update : 'POST', destroy: 'POST' }, } } Ext.define('Sencha.store.Teams', { extend: 'Ext.data.Store', config: { model: 'Sencha.model.Team', autoLoad: true, proxy: { type: 'ajaxpost' url: 'teams.json' } } });
Disclaimer: code was written from scratch and not really tested. Please do not downvote if it does not work, before not get replay on your comment. Thanks.
相关文章推荐
- Extjs4 使用store的post方法
- AJAX请求 $.post方法的使用
- MFC使用HttpGet和HttpPost方法与服务器通信
- 在VC中WININET如何使用HTTP的POST方法
- Android使用http协议的GET和POST方法!!!
- 使用httppost请求发送form表单的方法
- Android HTTP实例 使用GET方法和POST方法发送请求
- 在PHP中使用CURL实现GET和POST请求的方法
- Android 使用Post与Get方法进行表单提交数据
- ExtJs开发教程_001_Ext.data.Store使用方法详解
- HTTP方法:GET vs POST及jQuery使用这两种方法
- PHP中使用cURL实现Get和Post请求的方法
- PHP中的post和get方法的使用
- Android HttpClient GET或者POST请求基本使用方法
- Rails2.0中如何使用jQuery的post方法?
- AJAX请求 $.post方法的使用
- 如何使用POST 方法调用服务
- Java 程序 关于Properties 类使用Store方法时不能会覆盖以前Properties 文件的内容
- nodejs使用express获取get和post传值及session验证的方法
- 使用jquery ajax方法时,定义的请求类型由post变成get问题详解。