Link to home
Start Free TrialLog in
Avatar of naren1012
naren1012

asked on

Checkbox and Datatable problem in JSF

When I am using a t:selectBooleanCheckbox inside a t:datatable the checkbox doesn't retain the selections that the user made in the first request. In the subsequent requests the selections are retained. This seems to be a very common problem when I searched google. But unfortunately I could not find any solution for solving this.
<t:dataTable border="1" value="#{bb_ValuationDashboard.snapshotRoundDTO.fmisPurSalesDtls}"
	var="purchasedSales" 
	styleClass="dataTable" width="100%">
	<t:column width="3%">
		<f:facet name="header">
			<t:outputText styleClass="styTblHeaderNew" value="Select Checkbox to select row"></t:outputText>
		</f:facet>
		<t:selectBooleanCheckbox forceId="true" id="purSles" value="#{purchasedSales.isSelected}" />
	</t:column>
	<t:column width="14%">
		<f:facet name="header">
			<t:outputText styleClass="styTblHeaderNew" value="#{valDash.ss_displayPanel_purSalesTab_Address}"></t:outputText>
		</f:facet>
		<t:outputText value="#{purchasedSales.propertyAddress.addressLine1} 
		#{purchasedSales.propertyAddress.addressLine2} 
		#{purchasedSales.propertyAddress.city}  
		#{purchasedSales.propertyAddress.stateCode} " id="pAddress"></t:outputText>
	</t:column>							
</t:datatable>

Open in new window

Avatar of naren1012
naren1012

ASKER

I use myfaces 1.1.5 and tomahawk 1.1.5
ASKER CERTIFIED SOLUTION
Avatar of naren1012
naren1012

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial