I have a Ext.tree.Panel
and define in it I have a store
. I want to be able to update the store via ajax along with POST params.
Here is my tree definition:
var mytree = Ext.create('Ext.tree.Panel',{
rootVisible:false,
store:Ext.create('Ext.data.TreeStore', {
root:{
id:'rootnode',
nodeType:'async'
},
proxy:{
method:'post',
type:'ajax',
url:'myurl'
}
})
});
And I try and reload the store as follows:
mytree.store.load开发者_JAVA技巧({params:{search_string='value'}})
But the store attempts to reload with the params as GET
Parameters.
Some help would be greatly appreciated. The ExtJS 4 Docs arent great at the moment (in my opinion)
There is actionMethods parameter in proxy to specify method of requests: http://dev.sencha.com/deploy/ext-4.0.0/docs/api/Ext.data.proxy.Ajax.html
proxy:{
actionMethods: {
create: 'POST',
destroy: 'DELETE',
read: 'POST',
update: 'POST'
},
type:'ajax',
url:'myurl'
}
精彩评论