如何在sencha touch中使用ajaxproxy提供参数?在extjs你这样做
Ext.Ajax.request({
url: 'a.php/guest/getListGuests',
params: {poolId: 13},
scope: this,
callback: function(options, success, response) {
});
我怎样才能在我的sencha触摸代码中执行此操作?
var detailPanel2 = new Ext.Panel({
id:'detailPanel2',
layout:'fit',
items: [{
fullscreen:true,
xtype: 'list',
store: new Ext.data.Store({
model: 'team',
getGroupString : function(record) {
return record.get('name')[0];
},
proxy: new Ext.data.AjaxProxy({
url: 'a.php/guest/getListGuests',
extraParams: {
poolId: 13
},
method:'post',
reader: {
type: 'json',
root: 'data',
totalCount: 'count'
}
}),autoLoad:true
}),
sorters: [{
property: 'name',
direction: 'asc'
}],
itemTpl:'<font size="4" face="Helvetica, Arial" color="black">{name}</font>',
grouped: true,
onItemDisclosure : true,
listeners : {
itemtap : function(record,index,item,e){
if (e.getTarget('.x-list-disclosure')) {
//Ext.Msg.alert(index);
var redirect = 'showpool.php';
window.location = redirect;
}
// else { Ext.Msg.alert("Item clicked!");}
}
}
}]
})
正如你在上面的代码中看到的那样,我给了params但是这不适用于extjs代码。