【发布时间】:2013-01-02 10:44:30
【问题描述】:
如何从视图中获取我的应用程序?
例如,假设我有一个应用程序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);
}
});
【问题讨论】: