At 2:49 PM +0100 12/8/04, marc wrote:
I have a form that I pre-populat with some data that I'm passing forward from the action that point's to the form.
But then when I validat, and the validation fails. I then get returned to the form, as struts works.
But have do I get the origainal data in the form again. And not just the data from the reset funktion?

reset is not intended for a complete clearing of all properties, as you might guess if you think in analogy to the "release()" method in JSP custom tags. If you are using request scoped beans, then you rarely need to implement reset(). I can't remember the last time I did.


The bean is populated with the user data before it's validated, so if you change your reset() implementation so as not to interfere with that, you'll be fine. Then if you find that there is some piece of form state which actually does need to be reset, handle only that piece in your implementation of reset().

As noted in the JavaDoc, reset() is not intended for populating a form with initial values; that should be done in a setup Action by calling setter methods.

Hope this helps
        Joe

--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to