OMSS.MainPanel = Ext.extend(Ext.Panel, {
...
dataList: {},
detailShow: {},
... initComponent: function() {
...
this.store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({}),
reader: new Ext.data.JsonReader({}),
listeners: {
'load': function(store) {
//OMSS.MainPanel.prototype.showDetail();
//我想在这里调用showDetail方法,但是我发现上面的方法倒是能调到,不过如果在一个TabPanel中打开了多个包含此控件的页面,那么就会有问题了。
}
}
});
...
this.dataList.gridPanel = new Ext.grid.GridPanel({...}); this.detailShow.panel = new Ext.TabPanel({...}); }, showDetail: function() { contentPanel = this.detailShow.panel; }});
如何才能在Store的Load事件中调用此自定义控件的showDetail方法?
================OMSS.MainPanel = Ext.extend(Ext.Panel, {
...
dataList: {},
detailShow: {},
... initComponent: function() {
...
var _this = this;
this.store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({}),
reader: new Ext.data.JsonReader({}),
listeners: {
'load': function(store) {
//OMSS.MainPanel.prototype.showDetail();
//我想在这里调用showDetail方法,但是我发现上面的方法倒是能调到,不过如果在一个TabPanel中打开了多个包含此控件的页面,那么就会有问题了。
_this.showDetail();
}
}
});
...
this.dataList.gridPanel = new Ext.grid.GridPanel({...}); this.detailShow.panel = new Ext.TabPanel({...}); }, showDetail: function() { contentPanel = this.detailShow.panel; }});
'_this' 未定义