Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member Sébastien.Volle's Avatar
    Join Date
    Apr 2011
    Location
    Grenoble, France
    Posts
    70
    Vote Rating
    0
    Sébastien.Volle is on a distinguished road

      0  

    Default [4.0.4]TreeStore with REST proxy does not use RESTful URL

    [4.0.4]TreeStore with REST proxy does not use RESTful URL


    Ext version tested:
    • Ext 4.0.4

    Browser versions tested against:
    • Chrome 14

    Description:
    • When using a TreeStore with REST proxy, the URL format to request nodes is '/path_to_api/?<nodeParam>=<nodeId>' instead of '/path_to_api/<id>'

    Steps to reproduce the problem:
    • Use a Ext.data.TreeStore configured with a Ext.data.proxy.Rest proxy to query a REST API.

    The result that was expected:
    • The proxy builds a proper REST URL as described above.

    The result that occurs instead:
    • The proxy builds a URL with query strings parameter instead.

    Possible fix:
    • TreeStore load() method does not include the 'records' property in the options passed to its proxy. However, the REST proxy needs this parameter to get the record/node id to properly build the URL in the "/my_api/{id}" format. Merely adding 'records: [node]' to the options object (sorta) solves the problem. There still is a slight design issue here.
    aka Seboss

  2. #2
    Ext JS Premium Member holicon_abg's Avatar
    Join Date
    Mar 2011
    Location
    Poznan, Poland
    Posts
    52
    Vote Rating
    0
    holicon_abg is on a distinguished road

      0  

    Default


    any solutions in this case ? posible hack or hot fixes ?

  3. #3
    Ext JS Premium Member Sébastien.Volle's Avatar
    Join Date
    Apr 2011
    Location
    Grenoble, France
    Posts
    70
    Vote Rating
    0
    Sébastien.Volle is on a distinguished road

      0  

    Default


    I suggested a workaround at the end of the OP.
    aka Seboss

  4. #4
    Ext JS Premium Member holicon_abg's Avatar
    Join Date
    Mar 2011
    Location
    Poznan, Poland
    Posts
    52
    Vote Rating
    0
    holicon_abg is on a distinguished road

      0  

    Default


    OP ?

  5. #5
    Ext JS Premium Member Sébastien.Volle's Avatar
    Join Date
    Apr 2011
    Location
    Grenoble, France
    Posts
    70
    Vote Rating
    0
    Sébastien.Volle is on a distinguished road

      0  

    Default


    The first post.
    If memory serves, you have to hack into the load() method of Ext.data.TreeStore and make sure the options object have a "records" property like that:

    Code:
    options.records = [node];
    But I'm not 100% sure about this, that was 7 months ago and I moved away from using Ext.data.TreeStore with a REST proxy.
    aka Seboss

  6. #6
    Ext JS Premium Member holicon_abg's Avatar
    Join Date
    Mar 2011
    Location
    Poznan, Poland
    Posts
    52
    Vote Rating
    0
    holicon_abg is on a distinguished road

      0  

    Default


    i moved too ... for ajax but still its some stupid action for eg. i create new node and ajax proxy after store.sync() execute edit method... its big joke for me...
    Code:
    submit : function(button) {
            var win        = button.up('window');
            var form       = win.down('form');
            var record     = form.getRecord();
            var values     = form.getValues();
            var store      = this.getClassificationIndicatorsStore();
            var parent     = this.getClassificationindicatorsIndexTreepanel().getSelectionModel().getLastSelected();
            if (record && record.data) {
                //form.getForm().updateRecord(record);
                store.getNodeById(record.data.id).set('text', values.text);
            } else {
                if(!parent){
                    parent = store.getRootNode();
                }
                parent.appendChild({
                        text: values.text,
                        parent_id: values.parent_id,
                    });
                parent.expand();
            }
            store.sync();
            win.close();
        }
    or more wird i edited properly first time in second time proxy send data witch update 2 records...

    Edited
    i run the same code on ext 4.1 b3 and tree store works perfect both of proxy ajax and rest, add new node generate POST method, edit PUT ...

    @sencha make hotfix for tree store in ExtJs 4.0.7 ! pls.

  7. #7
    Sencha User
    Join Date
    Feb 2013
    Location
    San Diego, CA
    Posts
    8
    Vote Rating
    0
    Will de la Vega is on a distinguished road

      0  

    Default Has this been fixed yet?

    Has this been fixed yet?


    If so, can anyone please explain me how to do this?

    I have my Rest Service being called by the TreeStore with Query Strings every single time it asks for data to the server. I am getting a null response, since the service needs the params to be properly formatted for the Restful service. I have tried lots of things and getting nowhere.

    Please somebody provide some help.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar