本人Ext菜鸟,有问题请高手指导
viewport = new Ext.Viewport({
layout: 'border',
<%if("browser".equalsIgnoreCase(type)){%>
items:[toolbar,{
xtype:'tabpanel',
activeTab:0,
id:'tabPanel1',
region:'center',
items:[orgTree,{
xtype:'panel',
title:'岗位列表',
id:'stationListTab',
html:'<iframe id="stationListFrame" width="100%" height="100%" src="'+contextPath+'/base/stationlevel/stationlist.jsp?type=browser&multi=<%=multi%>&idsin=<%=idsin%>&refid=<%=refid%>"></iframe>'
}]
}]
<%}else{%>
items: [{id:'tabPanel1',items:orgTree}]
<%}%>
});
orgTree.root.appendChild(oneNode);
viewport. findById('tabPanel1').setActiveTab('stationListTab');
本段代码当中,stationListTab既然已经存在与viewport的item的item下面了,为什么最后还要用viewport. findById('tabPanel1').setActiveTab('stationListTab');这个设置呢
------解决方案--------------------
将stationListTab激活,也就是现实这个tab
------解决方案--------------------激活stationListTab,显示Tab