1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    undersun is on a distinguished road

      0  

    Default Unanswered: TreePanel and TreeStore

    Unanswered: TreePanel and TreeStore


    Hello!
    If I have this code, TreeStore call 'myAwesomeUrl'
    Code:
    Ext.create('Ext.tree.Panel', {
                height: 150,
                width: 200,
                rootVisible: false,
                title: 'Simple Tree',
                renderTo: Ext.getBody(),
                store: Ext.create('Ext.data.TreeStore', {
                    proxy: {
                        type: 'ajax',
                        url: 'myAwesomeUrl'
                    }
                })
            });
    But, if I comment or set rootVisible: true, store don't send any requests
    Code:
    Ext.create('Ext.tree.Panel', {
                height: 150,
                width: 200,
    //            rootVisible: false,
                title: 'Simple Tree',
                renderTo: Ext.getBody(),
                store: Ext.create('Ext.data.TreeStore', {
                    proxy: {
                        type: 'ajax',
                        url: 'myAwesomeUrl'
                    }
                })
            });

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,088
    Answers
    112
    Vote Rating
    95
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    Try setting expanded: true on your root config in treestore:

    http://docs.sencha.com/extjs/4.2.0/#...Store-cfg-root

Thread Participants: 1

Tags for this Thread