如何從視圖中獲取我的應用程序? 例如,考慮我有一個應用程序Boo
,並且有一個視圖名爲Boo.view.Foo.List
,我想在List
的視圖中獲得Boo
。如何從視圖中獲取應用程序?
編輯:
看到這個代碼,看看線20
Ext.define('Boo.view.Foo.List', {
extend: 'Ext.panel.Panel',
model: 'Boo.model.FooModel',
alias: 'widget.foolist',
store: 'FooListStore',
initComponent: function() {
this.columns = [
{
text: "Hello world",
dataIndex: 'Time',
flex: 1
},
{
xtype: 'actioncolumn',
width: 50,
items: [{
icon: 'cancel.png',
tooltip: 'Cancel',
handler: function (grid, rowIndex, colIndex, col, e) {
//Now I need to get the application here, for example with self.getApplication() or something like this.
}
}]
}];
this.callParent(arguments);
}
});
你能解釋更多的啓動法? –
再次查看代碼。 –