2013-08-06 31 views
0

我這裏有面板顯示正常,直到我試圖實現rowexpander插件:RowExpander沒有對電網的工作 - 的Ext JS 4.1.1

Ext.define('AM.view.userlist.List' ,{ 
    extend: 'Ext.grid.Panel', 
    alias: 'widget.userlist', 
    title: '<center>Results</center>', 
    store: 'User', 
    collapsible: true, 
    plugins: [{ 
      ptype: 'rowexpander', 
     id: 'rowexpander', 
      rowBodyTpl : [ 
       '<p>Name <b>{name}</b></p>', 
       '<p><b>Address {address}</b></p>' 
      ] 
     }], 
     collapsible: true, 
     animCollapse: false, 
    initComponent: function() { 
     this.columns = [ 
      {header: 'ID', dataIndex: 'id', flex: 4, tdCls: 'grid_cell'}, 
      {header: 'Name', dataIndex: 'name', flex: 4, tdCls: 'grid_cell'}, 
      {header: 'Address', dataIndex: 'address', flex: 3, tdCls: 'grid_cell'}, 
      {header: 'Phone', dataIndex: 'phone', flex: 3, tdCls: 'grid_cell'} 
     ]; 
    this.callParent(arguments); 
    //remaining code... 

當我嘗試添加插件,我得到這個例外:

TypeError: name is undefined 

我不知道爲什麼我不能讓它工作。有任何想法嗎?

+0

什麼是您的存儲和模式,如果有的話,是什麼樣子? – rixo

回答

2

嘗試:

... 
requires: [ 
    'Path.to.RowExpander' 
], 
...