当尝试在单击时调用选项卡面板中的函数方法时,方法正在侦听器中调用。这是我的代码,
var homepnl=Ext.create('Ext.TabPanel', {
id:'homepnl',
width:'100%',
height:'100%',
tabBarPosition: 'bottom',
defaults: {
styleHtmlContent: true
},
items: [
{
title: 'My Items',
iconCls: 'star',
id:'divtab1',
items: [myitemspnl]
},
{
title: 'Add Items',
iconCls: 'compose',
id:'divtab2',
items: [additemspnl]
},
{
title: 'Friend List',
iconCls: 'team',
//id:'friendsid',
id:'divtab3',
items:[friendslistpnl],
},
{
title: 'Search',
iconCls: 'search',
items: [searchpnl]
},
{
title: 'Settings',
iconCls: 'settings',
items: [settingspnl]
}
],
listeners: {
tabchange: function (homepnl, tab) {
alert(homepnl.id);// No alert is coming here
}
}
});
我的代码在这里有什么问题?请帮我解决