Problem with h:selectBooleanCheckbox inside h:dataTable
After submitting, boolean values are not getting set in our datatable, though other properties are set.
Earlier in the page, we have:
<h:selectBooleanCheckbox title="PhoneInd" value="#{CustomerProfileBean.faxPhonecallInd}" >
</h:selectBooleanCheckbox>
And this works fine.
However, in our dataTable, we have:
<h:dataTable id="ownershipTable" columnClasses="dynamicContent,dynamicContent,dynamicContent,dynamicContentCenter" headerClass="sectionSubHeader"
rowClasses="dynamicContent" styleClass="ownerShipTableWidth" value="#{CustomerProfileBean.iterationCounterArray}" var="iterationCounter">
<h:column>
<f:facet name="header">
<h:outputText value="Associated Parties"/>
</f:facet>
<h:outputText value="#{iterationCounter.customerProductAssociation.customer.firstNm}" />
<h:outputText value=" " />
<h:outputText value="#{iterationCounter.customerProductAssociation.customer.lastNm}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Role"/>
</f:facet>
<h:selectOneMenu value="#{iterationCounter.customerProductAssociation.customerProductRole}">
<f:selectItems value="#{CustomerProfileBean.dropDown.roles}"/>
</h:selectOneMenu>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="End Date"/>
</f:facet>
<h:inputText id="expirationDate" size="10" value="#{iterationCounter.customerProductAssociation.expirationDt}">
<f:convertDateTime type="date" pattern="MM/d/yyyy"/>
</h:inputText>
<h:graphicImage id="imgId" alt="Address is valid " url="../CP2/unprotected/images/calendar.png"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Never Associated"/>
</f:facet>
<h:selectBooleanCheckbox title="isSelected" value="#{iterationCounter.selected}" />
</h:column>
</h:dataTable>
The problem is that iterationCounter.selected is always false. Inside our IterationCounter object, we put a debug breakpoint, and that never got hit. The getter method does get called however. Why does our checkbox not work in the dataTable? Also, all the other fields in our data table DO get set. Strange...
if anybody has solved the similar issue please let me know.
Thanks
Sanjay Kale

