Ext4.2 store proxy传参数,发送post请求

阅读更多

 

传参数: extraParams

POST请求:actionMethods

 

var stoOrganization = Ext.create('Ext.data.Store', {
	pageSize: pagesize_combo.getValue(),
	//model: 'User',
	fields: [//'id','parentId','code','name','sortno'],
		{name: 'id'},
		{name: 'parentId'},
		{name: 'code'},
		{name: 'name'},
		{name: 'sortno'}
	],
	proxy: {
		type: 'ajax',
		url: 'list.json',
		extraParams  : {                         
			parentId : 0
		},
		reader: {
			type: 'json',
			root: 'extPage.rows',
            totalProperty: 'extPage.total'
		},
		actionMethods: {
			create : 'POST',
			read   : 'POST', // by default GET
			update : 'POST',
			destroy: 'POST'
		}
	},
	autoLoad: {start: 0, limit: pagesize_combo.getValue()}
});

 

你可能感兴趣的:(Ext,store,proxy,参数,post)