0
var listView = Ext.extend(Ext.list.ListView, {

    cls: '',
    loadMask: null,
   autoExpandColumn: 'Category',
   store: new Ext.data.JsonStore({
       url: '/System/DashboardUpdates/GetDashboardUpdates',
       remoteSort: true,

      totalProperty: 'RecordCount',
      root: 'PageItems',

        fields: [
            'Id',
            'Category',
           'CategoryId',
            'Description',
            'Source',
           'Created',
           'Actions'
        ]
    }),
    columns: [
        {
            header: 'Category',
            width: 80, fixed: true,
            sortable: true,
            dataIndex: 'Category'
        },
        {
            header: 'Description',
            sortable: true,
            id: 'Description',
            dataIndex: 'Description'
        },        
        {
            header: 'Source',
            width: 300, fixed: true,
            sortable: true,
            dataIndex: 'Source'
            renderer: function (v, m, r) {
                return '<a href="' + '/Utilities/Test/ViewTestVariable/' + r.data.Id + '">' + v + '</a>'; }
       },
        {
            header: 'Date', width: 90, fixed: true, sortable: true, dataIndex: 'Created'
        },
        {
            header: 'Actions',
            sortable: true,
            dataIndex: 'Actions'
        }
        ]
    ],
      initComponent: function () {
        listView.superclass.initComponent.call(this);
    }

});

Dashboard.Dashboard.DashboardUpdatesPanel = Ext.extend(Ext.Panel, {
    initComponent: function () {

        var actionPerModuleFields = ['Id',
            'CategoryId',
            'Description',
            'SourceId',
            'Created',
            'Actions'];
        this.actionsPerModuleStore = new Ext.data.JsonStore({
            url: '/System/DashboardUpdates/GetDashboardUpdates',
            root: 'PageItems',
            fields: actionPerModuleFields
        });
        this.items = [listView];
             this.listView = new listView({
                    store: new Ext.data.JsonStore({ fields: actionPerModuleFields })
                });
       this.on({
            afterlayout: {
                scope: this,
               single: true,
                fn: function () {
                    this.actionsPerModuleStore.load();
                }
            }
        });

        Dashboard.Dashboard.DashboardUpdatesPanel.superclass.initComponent.call(this);
    }

});
Ext.reg('UpdatePanel', Dashboard.Dashboard.DashboardUpdatesPanel);
4

1 回答 1

0

通过 JSLint 运行您的代码。您有语法错误 - 这肯定会导致问题。

正如埃文指出的那样,您实际上并没有提出问题。

于 2013-01-11T20:13:27.577 回答