struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lepkowski <Mark.Lepkow...@lmco.com>
Subject Re: reset doesn't work well
Date Fri, 20 Dec 2002 20:48:11 GMT
In my experience, the reset condition is the state that the form was in when it was loaded.
 So if you have a checkbox set when the form is loaded, uncheck it, and click [Reset], the
checkbox becomes checked again.

----- Original Message ----- 
From: "Doug Ogateter" <hinbsls@yahoo.ca>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, December 20, 2002 3:37 PM
Subject: reset doesn't work well


> 
> Hi:
> I have a problem with reset button. In my jsp file, I have
> <html:reset/>. In my form class, I have: 
> 
>   public void reset(ActionMapping mapping, HttpServletRequest request) {
>     amount = null;
> 
>     password = null;
>    }
> 
> in the struts-config.xml file, it has:
> 
>    <action    path="/xxx"
>                type="yyy"
>                name="myForm"
>               scope="request"
> 
>               input="/zzz.jsp">
>           <forward name="success"             path="/zzz.jsp"/>    
>     </action>
> 
> I filled out the fields, if I click reset button before submit the form,
> the fields are cleared. But if I submit the form first, and it detects
> some error(for example: the password is not correct), the form is showed
> with error message. In this case, when I click reset button, the fields
> are not cleared. What is wrong with this. I really want the fields can
> be cleared if errors are detected. Could someone help me out?
> 
> Thanks.
> 
> Doug
> 
> 
> 
> ---------------------------------
> Post your free ad now! Yahoo! Canada Personals
> 


--
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