I have 2 subforms on a page. They are identical except one gets itemsB and
the other gets itemsC. When an item of the bSubform is changed the items in
the cSubform are supposed to be updated. But I have the following problem;
I have a value change listener on both selectManyCheckbox (ie.
order.doVerifyItems). I check one if the items in the cSubform. Then I
check one of the checkboxes in the bSubform; it enters the
valueChangeListener. There I change the value of selectedItemCList where I
remove the checked item in the cSubform. When the valueChangeListener exits
the list in the <tr:forEach var="pType" items="#{order.availableItemCList}">
is updated but the value="#{order.selectedItemCList}" is not and the item
remains checked in the client side even if I removed it in the server side.
How can I update both the selected and the available list?
Code below:
<tr:panelGroupLayout
partialTriggers="bSubform:selectb cSubform:selectc"
id="groupC">
<tr:subform default="true" id="cSubform">
<tr:panelFormLayout>
<tr:selectManyCheckbox
valueChangeListener="#{order.doVerifyItems}"
autoSubmit="true" id="selectc"
value="#{order.selectedItemCList}">
<tr:forEach var="pType" items="#{order.availableItemCList}">
<tr:selectItem
disabled="#{(!order.requiredSelected && !(pType.line||
pType.orderable))}"
shortDesc="#{pType.name}"
longDesc="#{pType.name}"
label="#{pType.name}" value="#{pType}" />
</tr:forEach>
</tr:selectManyCheckbox>
</tr:panelFormLayout>
</tr:subform>
</tr:panelGroupLayout>
Thank you.