Ext.tree.Panel

    initComponent : function() {

        var data = null;
        Ext.Ajax.request({
            url : 'xxx/xx',
            method : 'GET',
            async:false,
            //params:{pid:this.pj},
            success : function(response, opts) {
                var respText = Ext.JSON.decode(response.responseText);
                data = respText.data;
            }
        });
        TreePanel.root = data;

}

原文地址:https://www.cnblogs.com/nidongde/p/5316524.html