The author is incorrect. Check out http://jakarta.apache.org/struts/faqs/newbie.html#reset for more info.

David

> Well, these validations have already been coded for you and can be
> configured in an xml file by using the Validator. I highly recommend you
> look into using the validator because it will save you a bunch of time.


I'll do soon. I getting acquainted with Struts working with the book
Professional Struts Applications. I still have 14 pages ahead the validator
framework. But before I jump to it, I'd like to understand why some
basics don't work to gain more confidence in the whole framework.

> Your problem may have something to do with setting the fields = "" in
reset.
>  I would put a stdout call in reset to see when it gets called.
I did that and reset gets called.

> If your forms are stored in the request (and I maybe even in the session)
then you
> don't need to implement the reset method at all.
They're being stored in the request. But wait a second. Why do you mean I
don't
need to implement the reset method? The guy in the book states:


"The reset() method is invoked only if the developer has declared that the
ActionForm
class should be stored in the request. This is necessary because Struts
maintains a cache
for each of the ActionForm classes. A single instance of an ActionForm class
can be
shared by multiple users for different reqests at different times. Hence,
the developer must
implement the reset() method to ensure that the end user never gets some
other user's
data"


How does this sound?

> It's really only needed to reset boolean properties.
He doesn't mention that...

Tom


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


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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



Reply via email to