0
我創建了一個窗口小部件作爲面板中的幾個組件。我如何鏈接記錄參數與這些組件?extjs5 widgetcolumn單個單元格中的多個窗口小部件
例如:
{
xtype: 'widgetcolumn',
dataIndex: 'data',
widget: {
xtype: 'panel',
height: 77,
width: 642,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [
{
xtype: 'button',
text: record.get('name') //<<-- how can i link this record from the grid with this component?
},
{
xtype: 'button',
text: record.get('type') //<<-- how can i link this record from the grid with this component?
},
{
xtype: 'button',
text: record.get('location') //<<-- how can i link this record from the grid with this component?
}
]
}
}
我有一個下列存儲:
var store = Ext.create('Ext.data.Store', {
fields:['name', 'type', 'location'],
data:[
{name: 'name1', type: 'type1', location: 'loc1'},
{name: 'name2', type: 'type2', location: 'loc2'}
]
});
也許,我可以通過渲染功能,訪問記錄?類似這樣的:
renderer: function(value, meta, record) {
//How can I get access to widget instance?
}