aspose file tools*
The moose likes Struts and the fly likes how to reset the field after validation using annotations(Struts 2) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to reset the field after validation using annotations(Struts 2)" Watch "how to reset the field after validation using annotations(Struts 2)" New topic
Author

how to reset the field after validation using annotations(Struts 2)

harilal ithikkat
Ranch Hand

Joined: Oct 06, 2008
Posts: 221
Hi,
I was trying to do some email validation using annotation.
.
I wanna reset the errorful data from the field at the time of validation.


Can anyone help for the same?


SCJP 1.5
"A candle looses nothing by lighting another candle"
itechmentors.com
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Reset it to what?
harilal ithikkat
Ranch Hand

Joined: Oct 06, 2008
Posts: 221
i wanna reset it to no value

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have a "prepare" method that sets it to an empty string.

That's not a great idea, though; why would you want their text to disappear? I'd be annoyed if I had to type in my entire email address *again* just because I left out the "@" the first time.
harilal ithikkat
Ranch Hand

Joined: Oct 06, 2008
Posts: 221
that's right.
But its worth knowing.Thats why
Thank you man
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to reset the field after validation using annotations(Struts 2)
 
Similar Threads
"file " field getting reset on click of submit
"file" field getting reset on clicking submit
Validating file extension problem
Reset the form to Null or Reload the page using reset even after a submit
Problem in Reset button.