【发布时间】:2011-12-21 10:49:55
【问题描述】:
我正在使用 Primefaces 2.2。我有 p:tabView 里面有三个标签。 Tab1 包含一个布尔复选框。现在我希望当用户单击 tab1 中的复选框时,tab 2 变为禁用。我该怎么做?这是代码预览。
<h:body>
<p:panel header="F.C. Barcelona" footer="Visca el Barca!">
<p:tabView>
<p:tab id="tab1" title="Godfather Part I">
<h:panelGrid columns="2" cellpadding="10">
<h:outputText value="In tab1." />
</h:panelGrid>
<h:selectBooleanCheckbox id="Mark"
value="#{disableTag.disable}" >
<f:ajax render="tab2" />
</h:selectBooleanCheckbox>
</p:tab>
<p:tab id="tab2" title="Godfather Part II">
<h:panelGrid columns="2" cellpadding="10">
<h:outputText value="In tab2." />
</h:panelGrid>
</p:tab>
<p:tab id="tab3" title="Godfather Part III">
<h:panelGrid columns="2" cellpadding="10">
<h:outputText value="In tab3." />
</h:panelGrid>
</p:tab>
</p:tabView>
</p:panel>
</h:body>
谢谢
【问题讨论】:
标签: jsf-2 primefaces