开发者

Disable/enable one checkbox on deselecting other checkbox in jsf?

1)

<h:column>
    <h:selectBooleanCheckbox
        value="#{CertificateInsuranceAddRq.开发者_开发问答insuranceSvcRq.com_csc_CertificateInsuranceAddRq.com_csc_CertificateInfo.com_csc_RenewalInd}">
        <p:ajax event="change" update="continuous" />
    </h:selectBooleanCheckbox>
    <h:outputLabel value="#{label.renewable}" style="font-weight:bold" />
</h:column>

2)

<h:column>
    <h:selectBooleanCheckbox id="continuous"
        disabled="#{!CertificateInsuranceAddRq.insuranceSvcRq.com_csc_CertificateInsuranceAddRq.com_csc_CertificateInfo.com_csc_RenewalInd}"
        value="#{CertificateInsuranceAddRq.insuranceSvcRq.com_csc_CertificateInsuranceAddRq.com_csc_CertificateInfo.contractTerm.continuousInd}">
    </h:selectBooleanCheckbox>
    <h:outputLabel value="#{label.contUntilCancel}" style="font-weight:bold" />
</h:column>

In this I have two checkbox, one is renewable(by default check) and other is continous until cancel. I want that when I deselect the renewable checkbox the other checkbox should be disabled.

Currently it not working and when I deselect the renewable checkbox the other checkbox is not getting disabled (it's getting disabled only when I click on window after deselecting) .

Please give me the way to solve it?


change

<p:ajax event="change" update="continuous" />

to

<p:ajax event="click" update="continuous" />

ie seems to accept the change only on focus out

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜