You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by StrutsUser <aj...@changepond.com> on 2008/06/05 08:33:43 UTC

not working after validation error

Hi,
I am having a situation where the <s:reset> tag does not work. I am doing
some client side validation using javascript and server side valdiations in
the 'validate()' method of my action class. 
When client side validation fails and I click the reset button, the data
gets cleared.
But when the validation fails in the 'validate()' method and I click the
reset button the data is not getting cleared. I don't know if this is a
known issue. 
Could anyone please help me out. 

Thanks in Advance
Ajay
-- 
View this message in context: http://www.nabble.com/%3CS%3ARESET%3E-not-working-after-validation-error-tp17663131p17663131.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: not working after validation error

Posted by Laurie Harper <la...@holoweb.net>.
StrutsUser wrote:
> Hi,
> I am having a situation where the <s:reset> tag does not work. I am doing
> some client side validation using javascript and server side valdiations in
> the 'validate()' method of my action class. 
> When client side validation fails and I click the reset button, the data
> gets cleared.
> But when the validation fails in the 'validate()' method and I click the
> reset button the data is not getting cleared. I don't know if this is a
> known issue. 
> Could anyone please help me out. 

That's expected behaviour; it's what the HTML 'reset' input type does. 
Reset will reset the form inputs to the values they had when the page 
was loaded. If you want a different behaviour, you will need to 
implement it yourself (either client-side with JavaScript, server-side 
(using a submit button instead of a reset), or some combination of both.

L.


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