在Ext.tree.panel中没有加载json数据

时间:2015-09-23 00:52:41

标签: json extjs

我已经定义了Ext.tree.Panel,并且在更改组合值时,我正在调用

tree.getStore()负载();

这是我的treepanel代码

Ext.define('InboxTreePanel', {
    extend: 'Ext.tree.Panel',
    xtype: 'inboxtreepanel',
    height: 250,
    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            store: Ext.create('Ext.data.TreeStore', {
                fields: [{
                    name: 'id',
                    type: 'string'
                }, {
                    name: 'text',
                    type: 'string'
                }],
                autoLoad: false,
                proxy: {
                    type: 'jsonajax',
                    url: app_global.serviceExtn + 'browseS3.do',
                    reader: {
                        type: 'json',
                        root: 'results'
                    }
                },
                root: {
                    loaded: false
                }
            }),
            columns: [{
                xtype: 'treecolumn',
                dataIndex: 'text',
                flex: 1,
                text: 'Nodes',
                editor: 'textfield'
            }]
        });

        me.callParent(arguments);
    }
});

作为回报,我收到了json数据,但数据未在treepanel中加载

{"success":true,
"code":null,
"message":null,
"data":[{"id":"root/Date-2015-08-30","text":"Date-2015-08-30","leaf":false},
    {"id":"root/Date-2015-08-31","text":"Date-2015-08-31","leaf":false},
    {"id":"root/Date-2015-09-08","text":"Date-2015-09-08","leaf":false},
    {"id":"root/Date-2015-09-09","text":"Date-2015-09-09","leaf":false}],
"totalCount":0}

任何人都可以帮助为什么数据没有在treepanel中加载?我的代码有什么问题

0 个答案:

没有答案