You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marco Tedone <m_...@hotmail.com> on 2003/03/20 01:43:32 UTC

[NEWBIE]Clear fields on a DynaValidatorForm and Reset button

Hi all,

I'm using a DynaValidatorForm for my login page with the following text
fields:

userName
password
dbName

I configured all the properties of the DynaValidatorForm in the <form-beans>
element with the initial attribute set to blanks. The first time I access
the form everything is fine; then I submit it, and correctly the next JSP
page is shown. In this JSP page I've got a link which call the ForwardAction
which will address the user to the Login page again; this time the values I
entered the first time are still there, while I was expecting to find blanks
in the userName and password(as the dbName is filled dynamically at
runtime). Shall I subclass the DynaValidatorForm and override the reset()
method? In this case, I should declare the userName and password properties
in order to clear them in the reset() method...What would it happen to the
properties declared in the struts-config.xml file?

Reset Button:
-------------

In the same page I inserted two buttons: <html:submit... /> and
<html:reset...> The second time I access the Login page, when I press the
reset button nothing happens, while I would expect the userName and password
fields to be cleared. Am I missing something?

Marco 

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