PDA

View Full Version : JsonStore - set default proxy method to 'GET'



chris-mac
21 Jun 2010, 6:32 AM
Hi,

I want all my JsonStores to use 'GET' method by default. So far I did it this way:



Ext.override(Ext.data.JsonStore, {

listeners: {

beforeload: function(store){

store.proxy.getConnection().method = 'GET';

}

}

});


but I am not sure if this is the best way to achieve this?

Thanks
Chris

Condor
21 Jun 2010, 7:04 AM
For all connections?

In that case you could use:

Ext.data.Connection.prototype.method = 'GET';

chris-mac
22 Jun 2010, 4:59 AM
Thank you Condor.

This is exactly what is was looking for.