Extjs4: TreeStore with POST method

I have Ext.tree.Panel and store defined in it. I want to update the store via ajax along with the POST parameters.

Here is my definition of a tree:

 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'm trying to reboot the repository as follows:

 mytree.store.load({params:{search_string='value'}}) 

But the repository is trying to reload with parameters like GET parameters.

Some help would be greatly appreciated. At the moment, it seems to me that ExtJS 4 Docs arent excellent (in my opinion)

+4
source share
1 answer

The proxy server has an actionMethods parameter to specify the request method: 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' } 
+3
source