This problem is regarding valueChangeEvent.
This is the xhtml where I am setting the BooleanCheckBoxId=#{productItem.uniqueId}
<h:panelGrid columns="2" >
<h:panelGroup>
<h:selectBooleanCheckbox id="#{productItem.uniqueId}"
value="#{productItem.checkedValue}"
disabled="#{productItem.disabled}"
valueChangeListener="#{spcProductModel.productClicked}">
<a4j:support event="onclick"
oncomplete="retrieveActionText(this);"
reRender="paymentFormCard,actionText,includedForm,parametersCardForm,productsPanel,spcTemplateForm,productsPanel,#{paramPanelId}" />
</h:selectBooleanCheckbox>
</h:panelGroup>
<h:panelGroup>
<h:outputLabel>id="#{productItem.uniqueId}"</h:outputLabel>
<h:outputLabel
value=" #{productItem.productRelation.product.productName}"
for="#{productItem.uniqueId}"></h:outputLabel>
</h:panelGroup>
</h:panelGrid>
The unique ID has been generated using the following code:
String uniqueIds = prod.getUniqueId();
Thus the BooleanCheckbox is becoming equal to UniqueIds.
When I am printing the BooleanCheckBoxId in my front end for checking purpose, it reflects the changes made. But when I am fetching it as
String selectedId = (String) vce.getComponent().getId(); and printing the selectedId in logger, it remains same as it generated in the very first time.
SelectedId is remaining same as the old one, It does not change.
Is there anything I need to add?
Because it works fine for the first time. but when the value changes in the previous calling page, it does not work.