struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <>
Subject Re: [FORMDEF] Resetting booleans for session-scoped dynaforms
Date Wed, 12 Oct 2005 21:57:22 GMT
On 10/12/05, Michael Jouravlev <> wrote:
> I am telling you that checkbox values should be cleared, you are
> telling me that reset() is get called. Don't you think these are
> different things? ;-)

I don't think there are any disagreements there.  :)  We're discussing
clearing these values in reset(), right?

> A reset() is a reset(), I still want it to be called. But I want some
> fields to be cleaned up automatically if I defined so, before reset()
> is called. Of course, when I have a regular ActionForm, I can do
> whatever I want in reset() method. We are talking about
> DynaActionForm, which is supposedly should not be explicitly created
> by user code.

Yes, and we're discussing how to do it properly.

> The sole purpose of reset() is to be called by Struts before form is
> populated.

Yes.  Major point here.

> Checkbox is an input element. Input element is part of HTML form. HTML
> form is submitted with POST method by default, and I don't know anyone
> who overrides HTTP method to use GET for that.
> Therefore, I want to clear checkboxes only when POST request comes.

Struts doesn't forbid form submission using GET.

> Do you want to say, that Struts somehow gets to know that a form was
> submitted? How exactly does it do that? Can you show it in the code?
> There is nothing in request which says "this stuff comes from an HTML
> form". Struts just gets a request with bunch of name/value pairs, and
> this is it. How should it know that this is a submission?

No, what I'm saying is Struts doesn't distinguish between the two
(AFAIK).  However, you seem to.

Regardless of your conventions for GET and POST, I still don't
understand how a call to reset() when a form is submitted messes up
your prepopulation routine when no forms are being submitted and
reset() doesn't get called.


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

View raw message