[英]How disable a <h:selectBooleanCheckbox> pressing a <a4j:commandButton> in jsf
<a4j:form id="formNC">
<rich:panel style="width: 100%">
<h:selectBooleanCheckbox value="#{crearCitaMB.booleanCheck">
<a4j:commandButton value="DisableCheck" action="#{testBean.methodCalculate}" />
</rich:panel>
</a4j:form>
my question is simple: can I "disable" not "hide" selectBooleanCheckbox when I press commandButton ... I do not know how make this yet. 我的问题很简单:我按下commandButton时可以“禁用”而不“隐藏” selectBooleanCheckbox吗?我不知道该怎么做。 Can this be done with aj4:support or javascript?
可以使用aj4:support或javascript完成吗?
try this... 尝试这个...
in page: 在页面中:
<a4j:form id="formNC">
<rich:panel style="width: 100%">
<h:selectBooleanCheckbox disabled="#{testBean.disableFlag"}
value="#{crearCitaMB.booleanCheck"}>
<a4j:commandButton value="DisableCheck"
action="#{testBean.methodCalculate}" render="formNC" />
</rich:panel>
</a4j:form>
in testBean: 在testBean中:
private boolean disableFlag;
public boolean isDisableFlag()
{
return disableFlag;
}
public void methodCalculate()
{
disableFlag = true;
...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.