This seems like it would be such an obviously trivial thing to do but for the life of me I can't figure out how.
I've also searched the forums and google for a way to do this for at least an hour and have still come up empty.
The scenario: I have a form with a captcha image. In the case of an invalid form submission (validation fails) the user will be directed back to the original form. However, since the captcha image is regenerated on every request, I want to clear the previous value the user entered in this form field.
I tried an obvious approach and tried to null out the previously entered user value in the form backing object that was passed into the validator. However this didn't work.
Clearly, spring is repopulating the form with values held somewhere else than in the form backing object that is passed into the validator(s).
How do I clear a previously entered form value during form submission so that the field is empty when the user is represented the form?


Reply With Quote
