selectBooleanCheckbox value doesn't set properly inside ui:repeat

纵饮孤独 提交于 2019-12-22 17:50:47

问题


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



来源:https://stackoverflow.com/questions/24856373/selectbooleancheckbox-value-doesnt-set-properly-inside-uirepeat

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!