Hybrid View
-
21 Aug 2007 3:28 AM #1
[1.1] JsonStore ignores the "method" property: like POST
[1.1] JsonStore ignores the "method" property: like POST
EXT1.1:
JsonSore ignores the "method" property:
Looking at the source it seems that only the URL property is used:PHP Code:ds = new Ext.data.JsonStore({
url: Base.siteUrl + 'main/respGetMitarbeiter',
method: 'POST', // this is ignored. Store always uses GET
root: 'data',
fields: ['id', 'vorname', 'nachname', 'anrede', 'email'],
remoteSort: true
});
Is this a bug?PHP Code:Ext.data.JsonStore = function(c){
10687 Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(c, {
10688 proxy: !c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined,
10689 reader: new Ext.data.JsonReader(c, c.fields)
10690 }));
10691};
Regards
Wolfgang
-
21 Aug 2007 4:59 AM #2
There is no method property on a JsonStore.
-
22 Aug 2007 8:38 AM #3
-
22 Aug 2007 8:50 AM #4
Or, rather, HttpProxy takes a connection object config. In any case, method is important. And also extraParams and defaultHeaders. Why not pass the config to HttpProxy the same as to the reader?
-
23 Aug 2007 12:09 AM #5
Well my understanding based on the docs was also that the JSONReader would inherit basic params from HttpProxy.But to cite the documentation: "Note: Although they are not listed, this class inherits all of the config options of Store, JsonReader and HttpProxy (unless inline data is provided)."
Without the ability to specify method POST or GET i think the JsonStore is a bit limited. Any plans to change this is an upcoming release?
-
3 Aug 2009 11:24 AM #6
Using Ext2.2 but same issue
Using Ext2.2 but same issue
I solved by configuring my own HttpProxy for the JsonStore
PHP Code:var mystore = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({url: 'http://www.cnn.com', method: 'GET'}),
...


Reply With Quote