Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Sep 2007
    Location
    Seoul, South Korea
    Posts
    10
    Vote Rating
    0
    nicetip is on a distinguished road

      0  

    Default [4.2.0] TreeStore.load bug

    [4.2.0] TreeStore.load bug


    Hello.

    TreeStore's load function is described like this.

    load( [options] )2Loads the Store using its configured proxy.
    Available since: Ext 4
    Parameters

    • options : Object (optional)config object. This is passed into the Operation object that is created and then sent to the proxy's Ext.data.proxy.Proxy.read function. The options can also contain a node, which indicates which node is to be loaded. If not specified, it will default to the root node.

    But, node option does not work after I upgrade ExtJS to 4.2.0 version.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,398
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is working for me:

    Code:
    var store = new Ext.data.TreeStore({
        proxy : {
            type : 'ajax',
            url  : 'data/json.json'
        },
        root  : {
            text     : 'Foo',
            expanded : true,
            children : [
                {
                    text : 'Bar',
                    id   : 'bar'
                }
            ]
        }
    });
    
    new Ext.tree.Panel({
        renderTo    : document.body,
        store       : store,
        dockedItems : [
            {
                xtype : 'toolbar',
                dock  : 'top',
                items : [
                    {
                        text    : 'Load Bar Node',
                        handler : function () {
                            var root = store.getRootNode(),
                                node = root.firstChild;
    
                            store.load({
                                node : node
                            });
                        }
                    }
                ]
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1