you can remove the form from request or session based on the scope in which
u stored the form after database is updated succesfully.
// Remove the obsolete form bean
if (mapping.getAttribute() != null) {
if ("request".equals(mapping.getScope()))
request.removeAttribute(mapping.getAttribute());
else
session.removeAttribute(mapping.getAttribute());
}
this will make struts create a new form.
-rana.
-----Original Message-----
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 24, 2002 10:26 AM
To: Struts Users Mailing List
Subject: How do I do this, input field retains value
Hi,
I have one jsp page with 2 text fields, I am using
DynaValidatorForm,
I have an action form where in i call an program to
update the database with these vaues.
and reloads the same jsp
Now the problem is
1> I have defined the 2 text fields as following
<html:text property="input1" size="15" maxlength="8"
/>
<html:text property="input2" size="15" maxlength="8"
/>
When there is some error, i get the error message and
also the retain the values entered by the user in
these fields.
But the values are also retained even if those are
updated in data base??
so how can i avoid reloading of these values when
there is no error
=====
A$HI$H
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>