struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Hunter" <>
Subject Re: reset is not being called on DynaValidatorForm
Date Tue, 25 Mar 2003 19:05:33 GMT
If I recall correctly, I had the wrong formBean associated with the action,
or something stupid like that, that the compiler couldn't catch.

Here's the code:

public class MemberForm extends
org.apache.struts.validator.DynaValidatorForm {

    public void reset (ActionMapping mapping, HttpServletRequest request) {
        super.reset(mapping, request);
        set("send_emails", new String(""));

Seems like I was making some changes in the struts-config file, and I
rebuilt a lot of classes, and it started working.  Based on the code above,
however, I can *ensure* you that reset() gets called.  I was logging too,
and it wasn't getting called for a while.

I had marked a breakpoint on the super.reset call and was debugging (I use
Sun ONE at the moment) and noticed that on a prior page, it was called, but
then when I went to the page I was actually looking to check, it DIDN'T get
called.  I changed the struts-config, and *poof* all better.

----- Original Message -----
From: <>
To: <>
Sent: Tuesday, March 25, 2003 1:56 PM
Subject: reset is not being called on DynaValidatorForm

> [This is going to be a duplicate.  One of the mail servers on campus is
holding messages hostage and will eventually release them.  However, it's
been more than 12 hours now and I need help with this!]
> I have the age-old "how to un-check the checkbox" problem. The only twist
is that this is a DynaValidatorForm.
> I've tried putting various things into the 'reset' method of my Form, but
nothing works:
> public void reset( ActionMapping mapping, HttpServletRequest request )
> {
>    log.debug( "ClearanceRequestForm.reset" );
>    if ( request.getParameter( "returningFromResolution" ) == null ) {
>       // set( "plannedGiftFlag", Boolean.FALSE );
>       // getMap().put("plannedGiftFlag",Boolean.FALSE);
>       initialize(mapping);
>    }
> }
> (I have to control whether the reset happens since I have a workflow that
involves going off to another form temporarily and then coming back to this
> Looking in the log file, I never see that log message, so I think that
reset is not being called.
> Ian Hunter, you were asking about this in mid-March, did you ever find a
> I searched Bugzilla but did not find anything, but I may have done it
wrong.  That search page is daunting to say the least.
> Isn't reset supposed to be called before the form is populated from the
values in the request?
> How do I uncheck a checkbox on a DynaValidatorForm?
> --
> Wendy Smoak
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message