selectBooleanCheckbox value doesn't set proper

2019-05-23 16:28发布

问题:

i have a ui repeat on a composite as follows:

-the ui repeat:

<ui:repeat var="award" value="#{myBean.awards}" varStatus="status">
    <mycomp:Award id="awardComp" value="#{award}" index="#{status.index}"></mycomp:Award>
</ui:repeat>

-the composite

<h:panelGroup id="cashRow" layout="block" style="height:30px">
<label id="anniversaryAwardCash" class="admin checkbox" style="float: left; clear: both; margin-top: 10px; width: 100px;"> 
  <h:selectBooleanCheckbox value="#{cc.attrs.value.cash}" style="margin-right:2px;" id="isanniversaryAwardCash"  >
     <f:ajax event="click"  render="cashRow" />
  </h:selectBooleanCheckbox> 
  <i></i>#{msg['action.givecash']}
</label>
<h:panelGroup layout="block" id="anniversaryAwardCashInputDiv" rendered="#{cc.attrs.value.cash}"  styleClass="field-container  input-prepend" style="clear: both;">
    <span class="add-on">$</span>
    <h:inputText id="anniversaryAwardCashCashInput" required="true" requiredMessage="#{validation['rule.positive.number.for.amount']}" placeholder="#{msg['amount']}" title="#{msg['amount']}" value="#{cc.attrs.value.awardDollars}"
        maxlength="19" converterMessage="#{validation['rule.positive.number.for.amount']}"
        styleClass="#{component.valid?'':'field-error'}">
    </h:inputText>
</h:panelGroup>

when i check the checkbox, something unchecks it, i don't know what is doing that, please advise why how to fix this behavior.

回答1:

Apparently that it's a bug and it's fixed in JSF version 2.2.7



标签: jsf-2 jsf-2.2