struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Jesse <>
Subject RE: reset() in FormBean
Date Fri, 02 Nov 2001 09:48:39 GMT

check in the code...

first: reset()
then:  populate()
at last: validate()

You need to do it, if you have checkboxes on your form, cause their value 
is only transmitted if they are set. Without the reset-methode you have
no knowledge when the user deselects them. Easy to try and then you know 
why the reset() is there.
Whether you use setXXX() or just do xXX = any_value does not harm.

hope this helps

-----Original Message-----
From: []
Sent: Thursday, November 01, 2001 1:30 AM
Subject: reset() in FormBean

When is the reset() method of the FormBean called?  I know the FormBean's
fields are first populated, then it's validate() method is called (if
validate="true" in the struts-config.xml), and then the perform() method of
the associated Action class is called.  -But when is the reset() called?
-If I override the method, do I call a series of setXXXX() methods to
default values. -Is it not a good idea to override the method? Should I
leave it at the default behavior? Any help would be much appreciated.
Thanks.  -T-

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message