The name parameter of the html:checkbox is the name of a bean, not the name
of a class.  If you remove the name attribute, it will default to the form
bean associated with the html:form surrounding the html:checkbox, which is
probably what you want.
 (*Chris*)

On 11/8/06, fea jabi <[EMAIL PROTECTED]> wrote:

can someone help me with this please.

Thanks.


>From: "fea jabi" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>To: user@struts.apache.org
>Subject: checkbox issue
>Date: Fri, 03 Nov 2006 17:30:09 -0500
>
>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]
>

_________________________________________________________________
Use your PC to make calls at very low rates
https://voiceoam.pcs.v2s.live.com/partnerredirect.aspx


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


Reply via email to