Hi There I am having a similar kinda problem in Struts using the Checkboxes.
<c:forEach items="${facilityInformationBean.dCdMap}" var="mapEntry">
<html:multibox name="facilityInformationBean" property="renFuelTypeCheckBoxes" styleId="facilityInformationBean.activeFacility.renFuelTypeCheckBoxes" value="${mapEntry.key}"/><c: out value="${mapEntry.value}"/> (<c: out value="${mapEntry.key}"/>)
</c:forEach>
When i check atleast one of them it works perfectly fine, but when i uncheck everything and submit , it shows me the previous selection instead of uncheking everything.
So , I searched on google and found that one should overwrite the reset method in the action class.
How do i overwrite the reset method ?
@Override
public void reset(ActionMapping mapping, ServletRequest request) {
// TODO Auto-generated method stub
super.reset(mapping, request);
}
where in I can reset renFuelTypeCheckBoxes[] to empty one.
Can you please help me regarding this.
Thank you for your time
-Vamshi