1. #1
    Sencha Developer
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    482
    Vote Rating
    1
    Wolfgang is on a distinguished road

      0  

    Default [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:
    PHP Code:
            ds = new Ext.data.JsonStore({
                
    urlBase.siteUrl 'main/respGetMitarbeiter',
                
    method'POST'// this is ignored. Store always uses GET
                
    root'data',
                
    fields: ['id''vorname''nachname''anrede''email'],
                
    remoteSorttrue
            
    }); 
    Looking at the source it seems that only the URL property is used:
    PHP Code:
    Ext.data.JsonStore = function(c){
    10687 Ext.data.JsonStore.superclass.constructor.call(thisExt.apply(c, {
    10688 proxy: !c.data ? new Ext.data.HttpProxy({urlc.url}) : undefined,
    10689 reader: new Ext.data.JsonReader(cc.fields)
    10690 }));
    10691}; 
    Is this a bug?

    Regards

    Wolfgang

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    There is no method property on a JsonStore.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  3. #3
    Ext User
    Join Date
    Jun 2007
    Posts
    11
    Vote Rating
    0
    kilrae is on a distinguished road

      0  

    Default


    Quote Originally Posted by jack.slocum View Post
    There is no method property on a JsonStore.
    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)."

    "method" is a config option of HttpProxy.

  4. #4
    Ext User
    Join Date
    Jun 2007
    Posts
    11
    Vote Rating
    0
    kilrae is on a distinguished road

      0  

    Default


    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?

  5. #5
    Sencha Developer
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    482
    Vote Rating
    1
    Wolfgang is on a distinguished road

      0  

    Default


    Quote Originally Posted by jack.slocum View Post
    There is no method property on a JsonStore.
    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)."
    Well my understanding based on the docs was also that the JSONReader would inherit basic params from HttpProxy.
    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?

  6. #6
    Ext JS Premium Member
    Join Date
    Apr 2008
    Posts
    5
    Vote Rating
    0
    msynovic is on a distinguished road

      0  

    Default 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'}),
      ...