我有一个这样的tabView:
<p:dialog id="dialog" header="Details" widgetVar="ctrDialog" resizable="true" width="450px" height="500px">
<p:tabView orientation="top" id="display" dynamic="true" >
<p:tab title="Operation">
<h:panelGrid id="mainPage" columns="2" cellpadding="10">
<f:facet name="header">
<p:graphicImage value="/resources/images/#{imagesBean.getImageName(errorContractBean.selectedContract.producttype)}.png" />
</f:facet>
<h:outputText value="#{bundle['emir_PRODUCTTYPE']}:" />
<h:outputText value="#{errorContractBean.selectedContract.producttype}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_PRODUCTSUBTYPE']}:" />
<h:outputText value="#{errorContractBean.selectedContract.productsubtype}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_PORTFOLIO']}:" />
<h:outputText value="#{errorContractBean.selectedContract.portfolio}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_TRADENUMBER']}:" />
<h:outputText value="#{errorContractBean.selectedContract.tradenumber}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_EVENTTYPE']}:" />
<h:outputText value="#{errorContractBean.selectedContract.eventtype}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_PARENTTRADENUMBER']}:" />
<h:outputText value="#{errorContractBean.selectedContract.parenttradenumber}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_COUNTERPART']}:" />
<h:outputText value="#{errorContractBean.selectedContract.counterpart}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_EVENTDATE']}:" />
<h:outputText value="#{errorContractBean.selectedContract.fmteventdate}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_TRADEDATE']}:" />
<h:outputText value="#{errorContractBean.selectedContract.fmttradedate}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_SDR']}:" />
<h:outputText value="#{errorContractBean.selectedContract.sdr}" style="font-weight:bold"/>
<h:outputText value="#{bundle['emir_USI']}:" />
<h:outputText value="#{errorContractBean.selectedContract.usi}" style="font-weight:bold"/>
</h:panelGrid>
</p:tab>
<p:tab title="First Leg" rendered="#{errorContractBean.hasfirstleg}">
<h:panelGrid id="leg1" columns="2" cellpadding="4">
<h:outputText value= "#{bundle['emir_OTCFIXVAR']}:"/> <h:outputText value= "#{errorContractBean.firstleg.fixvar}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSIGN']}:"/> <h:outputText value= "#{errorContractBean.firstleg.sign}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSTARTDATE']}:"/> <h:outputText value= "#{errorContractBean.firstleg.fmtstartdate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCENDDATE']}:"/> <h:outputText value= "#{errorContractBean.firstleg.fmtenddate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCPAYCURRENCY']}:"/> <h:outputText value= "#{errorContractBean.firstleg.paycurrency}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCNOTIONAL']}:"/> <h:outputText value= "#{errorContractBean.firstleg.notional}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCRATE']}:"/> <h:outputText value= "#{errorContractBean.firstleg.rate==0 ? 'N/A' : errorContractBean.firstleg.rate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCFREQUENCY']}:" /> <h:outputText value= "#{errorContractBean.firstleg.frequency}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCFREQUENCYUNIT']}:" /> <h:outputText value= "#{errorContractBean.firstleg.frequencyunit}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCFREQUENCYMULTIPLIER']}:" /> <h:outputText value= "#{errorContractBean.firstleg.frequencymultiplier==0 ? 'N/A' : errorContractBean.firstleg.frequencymultiplier}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCINDEXNAME']}:"/> <h:outputText value= "#{errorContractBean.firstleg.indexname}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCMARGIN']}:"/> <h:outputText value= "#{errorContractBean.firstleg.margin}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONTYPE']}:"/> <h:outputText value= "#{errorContractBean.firstleg.optiontype}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONMATURITY']}:"/> <h:outputText value= "#{errorContractBean.firstleg.optionmaturity}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONCASHDELIVERY']}:"/> <h:outputText value= "#{errorContractBean.firstleg.optioncashdelivery}" style="font-weight:bold"/>
<h:outputText value= "In arrears:"/> <h:outputText value= "#{errorContractBean.firstleg.inareas==0 ? 'N/A' : 'true'}" style="font-weight:bold"/>
<h:outputText value= "Day Convention:"/> <h:outputText value= "#{errorContractBean.firstleg.dayconvention}" style="font-weight:bold"/>
<h:outputText value= "Call Curr.:"/> <h:outputText value= "#{errorContractBean.firstleg.callcurrency}" style="font-weight:bold"/>
<h:outputText value= "Call Maturity:"/> <h:outputText value= "#{errorContractBean.firstleg.callmaturity}" style="font-weight:bold"/>
<h:outputText value= "Call Amount:"/> <h:outputText value= "#{errorContractBean.firstleg.callamount}" style="font-weight:bold"/>
<h:outputText value= "Put Curr.:"/> <h:outputText value= "#{errorContractBean.firstleg.putcurrency}" style="font-weight:bold"/>
<h:outputText value= "Put Maturity:"/> <h:outputText value= "#{errorContractBean.firstleg.putmaturity}" style="font-weight:bold"/>
<h:outputText value= "Put Amount:"/> <h:outputText value= "#{errorContractBean.firstleg.putamount}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSTRIKE']}:"/> <h:outputText value= "#{errorContractBean.firstleg.strike}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONEXETYPE']}:"/> <h:outputText value= "#{errorContractBean.firstleg.exercisemode}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCQTYUNIT']}:"/> <h:outputText value= "#{errorContractBean.firstleg.quantityunit}" style="font-weight:bold"/>
</h:panelGrid>
</p:tab>
<p:tab title="Second Leg" rendered="#{errorContractBean.hassecondleg}">
<h:panelGrid id="leg2" columns="2" cellpadding="4">
<h:outputText value= "#{bundle['emir_OTCFIXVAR']}:"/> <h:outputText value= "#{errorContractBean.secondleg.fixvar}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSIGN']}:"/> <h:outputText value= "#{errorContractBean.secondleg.sign}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSTARTDATE']}:"/> <h:outputText value= "#{errorContractBean.secondleg.fmtstartdate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCENDDATE']}:"/> <h:outputText value= "#{errorContractBean.secondleg.fmtenddate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCPAYCURRENCY']}:"/> <h:outputText value= "#{errorContractBean.secondleg.paycurrency}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCNOTIONAL']}:"/> <h:outputText value= "#{errorContractBean.secondleg.notional}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCRATE']}:"/> <h:outputText value= "#{errorContractBean.secondleg.rate==0 ? 'N/A' : errorContractBean.secondleg.rate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCFREQUENCY']}:" /> <h:outputText value= "#{errorContractBean.secondleg.frequency}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCFREQUENCYUNIT']}:" /> <h:outputText value= "#{errorContractBean.secondleg.frequencyunit}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCFREQUENCYMULTIPLIER']}:" /> <h:outputText value= "#{errorContractBean.secondleg.frequencymultiplier==0 ? 'N/A' : errorContractBean.secondleg.frequencymultiplier}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCINDEXNAME']}:"/> <h:outputText value= "#{errorContractBean.secondleg.indexname}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCMARGIN']}:"/> <h:outputText value= "#{errorContractBean.secondleg.margin}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONTYPE']}:"/> <h:outputText value= "#{errorContractBean.secondleg.optiontype}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONMATURITY']}:"/> <h:outputText value= "#{errorContractBean.secondleg.optionmaturity}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONCASHDELIVERY']}:"/> <h:outputText value= "#{errorContractBean.secondleg.optioncashdelivery}" style="font-weight:bold"/>
<h:outputText value= "In arrears:"/> <h:outputText value= "#{errorContractBean.secondleg.inareas==0 ? 'N/A' : 'true'}" style="font-weight:bold"/>
<h:outputText value= "Day Convention:"/> <h:outputText value= "#{errorContractBean.secondleg.dayconvention}" style="font-weight:bold"/>
<h:outputText value= "Call Curr.:"/> <h:outputText value= "#{errorContractBean.secondleg.callcurrency}" style="font-weight:bold"/>
<h:outputText value= "Call Maturity:"/> <h:outputText value= "#{errorContractBean.secondleg.callmaturity}" style="font-weight:bold"/>
<h:outputText value= "Call Amount:"/> <h:outputText value= "#{errorContractBean.secondleg.callamount}" style="font-weight:bold"/>
<h:outputText value= "Put Curr.:"/> <h:outputText value= "#{errorContractBean.secondleg.putcurrency}" style="font-weight:bold"/>
<h:outputText value= "Put Maturity:"/> <h:outputText value= "#{errorContractBean.secondleg.putmaturity}" style="font-weight:bold"/>
<h:outputText value= "Put Amount:"/> <h:outputText value= "#{errorContractBean.secondleg.putamount}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSTRIKE']}:"/> <h:outputText value= "#{errorContractBean.secondleg.strike}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCOPTIONEXETYPE']}:"/> <h:outputText value= "#{errorContractBean.secondleg.exercisemode}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCQTYUNIT']}:"/> <h:outputText value= "#{errorContractBean.secondleg.quantityunit}" style="font-weight:bold"/>
</h:panelGrid>
</p:tab>
<p:tab title="Near Leg" rendered="#{errorContractBean.hasnearleg}">
<h:panelGrid id="near" columns="2" cellpadding="4">
<h:outputText value= "#{bundle['emir_OTCCURRENCYBUY']}:"/> <h:outputText value= "#{errorContractBean.nearleg.currencybuy}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCCURRENCYSELL']}:"/> <h:outputText value= "#{errorContractBean.nearleg.currencysell}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCPRICEFACTOR']}:"/> <h:outputText value= "#{errorContractBean.nearleg.pricefactor}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSWAPRATE']}:" /> <h:outputText value= "#{errorContractBean.nearleg.swaprate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCVOLUMEBUY']}:" /> <h:outputText value= "#{errorContractBean.nearleg.volumebuy}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCVOLUMESELL']}:" /> <h:outputText value= "#{errorContractBean.nearleg.volumesell}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCTIPOPRODOTTO']}:"/> <h:outputText value= "#{errorContractBean.nearleg.tipoprodotto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCAMMONTAREINTERESSI']}:"/> <h:outputText value= "#{errorContractBean.nearleg.ammontareinteressi}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCCODICECONTRATTO']}:"/> <h:outputText value= "#{errorContractBean.nearleg.codicecontratto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDATACONTRATTO']}:"/> <h:outputText value= "#{errorContractBean.nearleg.datacontratto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCORACONTRATTO']}:"/> <h:outputText value= "#{errorContractBean.nearleg.oracontratto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDEALTRANSREFERENCE']}:"/> <h:outputText value= "#{errorContractBean.nearleg.dealtransreference}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDEALINDEX']}:"/> <h:outputText value= "#{errorContractBean.nearleg.dealindex}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCTRADERID']}:"/> <h:outputText value= "#{errorContractBean.nearleg.traderid}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCIDCONTROPARTE']}:"/> <h:outputText value= "#{errorContractBean.nearleg.idcontroparte}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCNOMECONTROPARTE']}:"/> <h:outputText value= "#{errorContractBean.nearleg.nomecontroparte}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDATAINIZIOREGOLAMENTO']}:"/> <h:outputText value= "#{errorContractBean.nearleg.datainizioregolamento}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDATAREGOLAMENTO']}:"/> <h:outputText value= "#{errorContractBean.nearleg.dataregolamento}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSPOTPRICEFACTOR']}:"/> <h:outputText value= "#{errorContractBean.nearleg.spotpricefactor}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSPOTDATE']}:"/> <h:outputText value= "#{errorContractBean.nearleg.spotdate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCVSEURPRICEFACTOR']}:"/> <h:outputText value= "#{errorContractBean.nearleg.vseurpricefactor}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCBASISPOINT']}:"/> <h:outputText value= "#{errorContractBean.nearleg.basispoint}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCUSI']}:"/> <h:outputText value= "#{errorContractBean.nearleg.usi}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSDR']}:"/> <h:outputText value= "#{errorContractBean.nearleg.sdr}" style="font-weight:bold"/>
</h:panelGrid>
</p:tab>
<p:tab title="Far Leg" rendered="#{errorContractBean.hasfarleg}">
<h:panelGrid id="far" columns="2" cellpadding="4">
<h:outputText value= "#{bundle['emir_OTCCURRENCYBUY']}:"/> <h:outputText value= "#{errorContractBean.farleg.currencybuy}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCCURRENCYSELL']}:"/> <h:outputText value= "#{errorContractBean.farleg.currencysell}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCPRICEFACTOR']}:"/> <h:outputText value= "#{errorContractBean.farleg.pricefactor}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSWAPRATE']}:" /> <h:outputText value= "#{errorContractBean.farleg.swaprate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCVOLUMEBUY']}:" /> <h:outputText value= "#{errorContractBean.farleg.volumebuy}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCVOLUMESELL']}:" /> <h:outputText value= "#{errorContractBean.farleg.volumesell}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCTIPOPRODOTTO']}:"/> <h:outputText value= "#{errorContractBean.farleg.tipoprodotto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCAMMONTAREINTERESSI']}:"/> <h:outputText value= "#{errorContractBean.farleg.ammontareinteressi}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCCODICECONTRATTO']}:"/> <h:outputText value= "#{errorContractBean.farleg.codicecontratto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDATACONTRATTO']}:"/> <h:outputText value= "#{errorContractBean.farleg.datacontratto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCORACONTRATTO']}:"/> <h:outputText value= "#{errorContractBean.farleg.oracontratto}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDEALTRANSREFERENCE']}:"/> <h:outputText value= "#{errorContractBean.farleg.dealtransreference}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDEALINDEX']}:"/> <h:outputText value= "#{errorContractBean.farleg.dealindex}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCTRADERID']}:"/> <h:outputText value= "#{errorContractBean.farleg.traderid}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCIDCONTROPARTE']}:"/> <h:outputText value= "#{errorContractBean.farleg.idcontroparte}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCNOMECONTROPARTE']}:"/> <h:outputText value= "#{errorContractBean.farleg.nomecontroparte}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDATAINIZIOREGOLAMENTO']}:"/> <h:outputText value= "#{errorContractBean.farleg.datainizioregolamento}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCDATAREGOLAMENTO']}:"/> <h:outputText value= "#{errorContractBean.farleg.dataregolamento}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSPOTPRICEFACTOR']}:"/> <h:outputText value= "#{errorContractBean.farleg.spotpricefactor}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSPOTDATE']}:"/> <h:outputText value= "#{errorContractBean.farleg.spotdate}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCVSEURPRICEFACTOR']}:"/> <h:outputText value= "#{errorContractBean.farleg.vseurpricefactor}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCBASISPOINT']}:"/> <h:outputText value= "#{errorContractBean.farleg.basispoint}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCUSI']}:"/> <h:outputText value= "#{errorContractBean.farleg.usi}" style="font-weight:bold"/>
<h:outputText value= "#{bundle['emir_OTCSDR']}:"/> <h:outputText value= "#{errorContractBean.farleg.sdr}" style="font-weight:bold"/>
</h:panelGrid>
</p:tab>
</p:tabView>
</p:dialog>
当我第一次按下显示此对话框的按钮时:
- 它正确显示第一个选项卡。
- 我将标签更改为第二个
- 我关闭视图
- 我再次打开视图
- 它在第二个选项卡上,而不是在第一个选项卡上。
如何将视图设置为始终在第一个选项卡中?