> You could use a reset button
> <input type="reset" value="Label for reset button" />

It don't always work because it reset to the values that were populated on page load. The case it don't work is when you make a change on a form, post it and there was errors. The form is loaded again with the wrong values you previously typed and an error message. If you push a "reset button", it will reset to the wrong values ...
The only way is to use an action for this.

Mike

Lance a écrit :
You could use a reset button
<input type="reset" value="Label for reset button" />

Chaudhary, Harsh wrote:
Yea, that's what I was thinking too. I was just wondering if Struts (or
some other API) has a built-in caching mechanism. Thanks though,
Harsh.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Paul Benedict
Sent: Tuesday, April 24, 2007 4:55 PM
To: Struts Users Mailing List
Subject: Re: Reset struts form values: Struts 1.3


Chaudhary, Harsh <[EMAIL PROTECTED]> wrote:
Hi,

I am using Struts 1.3. We have several struts forms which are
pre-populated from a database.

My questions is, if I want to provide the user with a way to reset the
form to the initial values which were populated from the database.



It sounds like you will be providing a button for this choice. If so,
then
wire it up to a Struts action which will get the values from the
database.
Or if those values are cached in application scope, just retrieve those
again.

Paul

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



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


--

Mike Baroukh

---
Cardiweb  - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED]
http://www.cardiweb.com
---

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

Reply via email to