struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Loren Hall" <lorenh...@attbi.com>
Subject RE: Why is the reset method called when I submit the form?
Date Thu, 23 Jan 2003 13:39:33 GMT


I had similar behavior that I found odd with 1.0.2, the actionform would be
populated, reset was then called, and then validate was called.

Jeremy, my *solution* was to overwrite reset() to do nothing at all. By
creating another method to mimic the reset, I now call reset when it's more
advantageous.


>I guess struts calls reset in order to save all
> your input and then does the validation

I don't get that on two assumptions, (clarification appreciated.)

1) Isn't reset() to clear out old data from a bean being recycled, as
opposed to a method for saving that old data?
2) Isn't the very role of validating to prevent unruly, non-conforming data
from being saved?

Loren



-----Original Message-----
From: pqin@shareowner.com [mailto:pqin@shareowner.com]
Sent: Wednesday, January 22, 2003 1:47 PM
To: struts-user@jakarta.apache.org
Subject: RE: Why is the reset method called when I submit the form?


I guess struts calls reset in order to save all your input and then does the
validation

Regards,


PQ

"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Jeremy Cavagnolo [mailto:jeremy@paradoxcomponents.com]
Sent: January 22, 2003 2:53 PM
To: struts-user@jakarta.apache.org
Subject: Why is the reset method called when I submit the form?

It seems that when I submit my form, the reset method is called before
the validate method.  I am using struts 1.0.2.

Any insight?

-Jeremy




--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message