2013-01-11 29 views
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); 
+2

您可能想要更新您的帖子,但并未提供任何有关问题的信息。 –

+0

列表在我的查看页面上不可见 – akshayv2t

+0

您可以将加载,例外和loadexception监听器添加到您的商店,并检查它正在进行哪个块。 我可以知道通过fiddler跟踪的错误代码吗? 这些可能有助于调试 – vajrakumar

回答

0

通过JSLint运行您的代码。你有一个语法错误 - 肯定会造成问题。

正如Evan指出的,你实际上并没有提出一个问题。

相关问题