【发布时间】:2011-10-09 22:56:05
【问题描述】:
我有组件,我正在尝试禁用下面的 panelGrid。
<h:selectBooleanCheckbox id="checkboxId" value="#{bean.checked}">
<p:ajax update="panelId" event="click"/>
</h:selectBooleanCheckbox>
<h:panelGrid id="panelId" rendered="#{!bean.checked}">
<h:outputLabel>some text</h:outputLabel>
<h:outputLabel>#registrationBB.registrationModel.homeAddress.actualAddressMathWithRegistration}</h:outputLabel>
</h:panelGrid>
因此,单击复选框不会生效。检查指示器甚至不会出现在复选框组件上,并且值 bean:checked 不会发送到服务器。 我也试过用。检查指示器出现但面板未刷新
如何通过复选框使用更新?
【问题讨论】:
-
在黑暗中拍摄:改用
<f:ajax event="click" render="panelId" />。在某些特定情况下,<p:ajax>不起作用,我相信其中一个被包装在非 PrimeFaces 组件中。 -
你有一个
h:form包裹所有这些吗? -
是的,表格存在
-
@BalusC 如果我尝试使用 event="click" 两种情况下都不会出现检查指示器
标签: jsf jsf-2 primefaces