'SelectBooleanCheckBox value is repeating in ui repeat
I am using a SelectBooleanCheckBox inside a ui:repeat, and when I am repeating the content with a button, the state of the checkbox is also replicating. ie, if I checked the box for the first instance and i replicate the checkbox using ui:repeat then the second instance is also have the same state.
<ui:repeat var="mock" value="#{mockbean.mocking.mock}" id="mockRepeater" varStatus="mockStatus"
rendered="#{mockbean.mocking.hasmock()}" >
<h:selectBooleanCheckbox value ="MockcannotFind" id ="MockcannotFind_#{mockStatus.index}" class="MockcannotFind" onchange="jsFunction(#{MockcannotFind.index})" > // having some functionalities with Js Code
</h:selectBooleanCheckbox>
</ui:repeat>
<b:commandLink styleClass="addanotherbox" immediate="true"
rendered="#{mockbean.mocking.hasmock()}"
value="#{i18n['checkbox']}"
actionListener="#{mockbean.addMock()}" >
<f:param name="onAddAnotherBoxButton" value="true" />
</b:commandLink>
Could any one please help me on this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

