HI
I've played with this issue for days - someone out there can help. I need the initial load of my page to have the checkboxes "checked"
i've tried:
setting the property initial value in the
struts config;
setting the value in the
jsp;
setting the varible to true in the form, this works great except the value is the always true, even when I unselect the box and submit the form.
so if anyone has any ideas I'd really appreciate it.
here is my code, when I check the box and submit the value passes correctly, I just cannot get the checkbox to display checked when the page loads....
jsp:
<html:checkbox value="true" property="ckCancelled"/>Cancelled
struts-config:
..initialcompleteCancelForm
<form-property name="ckCompleted" initial="true" type="java.lang.boolean"/>
<action path="/completedCancelled" type="CompleteCancelAction"
name="initialcompleteCancelForm" scope="request" validate="true" input="/completeCancelReport.jsp">
<forward name="success" path="/jsp/completeCancelReport.jsp" />
<forward name="failure" path="/jsp/completeCancelReport.jsp" />
</action>
form bean:
private boolean ckCancelled;
public boolean getCkCompleted() { return ckCompleted; }
public void setCkCompleted(boolean ckCompleted) { this.ckCompleted = ckCompleted; }