On 10/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:[snip]

> No. reset() is supposed to be overriden by an application developer,
> it is empty by default. But I cannot override reset() on a dynabean,
> can I? I suppose that I cannot, please correct me if I am wrong.


Sure you can.

* Write a class that extends DynaActionForm and implements
your custom reset() method.

* Use this as the "className" attribute value instead of
DynaActionForm.

Yes, you have to write a class for each bean where you need a custom reset()
method, but it only needs to contain reset() -- you don't have to write all
the getters and setters that you would in a standard form bean. Indeed, your
reset() method has direct access to the underlying Map named dynaValues,
which contains the actual name/value pairs ... and that's what you would
actually be changing.

Craig

Reply via email to