我正在使用咖啡脚本在 ExtJS 4.2 MVC 样式应用程序中工作并尝试使用 rowExpander。网格似乎没有呈现“rowBodyTpl”,每当我单击以展开该行时,我都会收到一个错误:“未捕获的 TypeError:无法调用 null 的方法 'removeCls'”和“未捕获的 TypeError:无法调用”方法 'addCls' of null ' 任何见解或建议将不胜感激。
Ext.define( "Test.view.ExpandGrid",
extend: "Ext.grid.Panel"
alias: "widget.test-view-expandGrid"
controller: "Test.controller.ExpandGridController"
requires: [ "Ext.data.*", "Ext.grid.*", "Ext.grid.plugin.RowExpander" ]
inject: [ "testStore" ]
config:
testStore: null
plugins: [{
ptype: 'rowexpander',
rowBodyTpl : [
'something'
]
}]
initComponent: ->
Ext.apply( @,
store: @getTestStore()
columns: [
{ text: "field1", dataIndex: "field1_data" },
{ text: "field2", dataIndex: "field2_data" },
{ text: "field3", dataIndex: "field3_data" }
],
features: [
ftype: "rowbody",
ftype: "rowwrap"
]
)
@callParent( arguments )
)