selectBooleanCheckbox值在ui:repeat中未正确设置 [英] selectBooleanCheckbox value doesn't set properly inside ui:repeat

查看:102
本文介绍了selectBooleanCheckbox值在ui:repeat中未正确设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在复合材料上有一个ui重复,如下所示:

i have a ui repeat on a composite as follows:

-用户界面重复:

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

-复合

<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.

推荐答案

显然,这是一个错误,并且已在JSF 2.2.7版中修复.

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

这篇关于selectBooleanCheckbox值在ui:repeat中未正确设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆