struts-config

The below form-bean is session scoped and hence using reset.

<form-bean name="CustForm" type="com.formbeans.CustForm" dynamic="true">
        ...........
        <form-property name="split" type="java.lang.Boolean"/>


</form-bean>



public class CustForm extends DynaValidatorForm {

   public CustForm() {
   }

public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) {

        set("split", Boolean.FALSE);
   }

}


DispatchCustAction

public ActionForward save(ActionMapping mapping,
                            ActionForm form,
                            HttpServletRequest request,
                HttpServletResponse response) throws IOException, 
ServletException
        {
                DynaValidatorForm frm = (DynaValidatorForm)form;

..............
...............

                return mapping.findForward("successSave");
        }



JSP:
<html:form>
        .............
        <html:checkbox name="CustForm" property="split"/>

        ...
</html:form>

When this jsp is first loaded the checkbox above is unchecked.

When user checked the checkbox, and clicked a submit save button, in the save method of dispatch action I was expecting to see the split value as "true". But it was "false" when I debug.

why is this?

What am I missing here?

_________________________________________________________________
Add a Yahoo! contact to Windows Live Messenger for a chance to win a free trip! http://www.imagine-windowslive.com/minisites/yahoo/default.aspx?locale=en-us&hmtagline


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to