struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Reset after submit
Date Mon, 20 Dec 2004 23:26:37 GMT
Wendy, I'm referring to the 2nd case you mentioned, when the form has failed validation. I
do believe you have just answered my question. 


-----Original Message-----
From: Wendy Smoak <>
Sent: Dec 20, 2004 3:06 PM
To: Struts Users Mailing List <>,
Subject: Re: Reset after submit

From: <>
> My beginner struggles continue. I am unable to make a reset respond after
the submit has
> committed data to the form bean. The reset works as expected before the
submit on a form
> is invoked. I have checked the docs and cannot find out whether this is
intended (or not).

You haven't given us very much to go on.  What do you expect reset to do?
What documentation did you read?

I don't use reset buttons, but I stuck an <html-el:reset> tag on the form
I'm working with.  It just generated a plain-old HTML reset tag:  <input
type="reset" value="Reset">

And reset has always been a client-side HTML thing.  It resets the form to
what it looked like at the beginning of the request.  So if you have a form
that failed validation and is re-presented with values, if you change a
value and click 'reset,' it will revert to the original value.

The only time it will blank out the form fields is, as you've noted, prior
to the first submit, when the fields were blank to begin with.  This isn't a
Struts issue, it's the way it's always been with HTML forms.

Hope that helps, post again if I've totally misinterpreted what you were
after... it's been known to happen. ;)

Wendy Smoak

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

View raw message