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()}
});

猜你喜欢

转载自happyqing.iteye.com/blog/2208461