1. Struts find the formbean on scope or creates a new one 2. formbean.reset() is called to set all properties to default values 3. formbean is populated from request parameters 4. formbean.validate() is called (if configured) 5. formbean is passed to action
reset() is used to set all property to default. It is mandatory for HTML checkbox, wich values sent into request when checked : If you uncheck a checkbox, they're will be no parameter in request. reset() allow you to set default to false, so . if checkbox has been checked -> populate will set property to true. . if checkbox has not been checked -> reset has set property to false. Your formbean datas conforms with what showed HTML browser. Nico. > > > I had similar behavior that I found odd with 1.0.2, the actionform would be > populated, reset was then called, and then validate was called. > > Jeremy, my *solution* was to overwrite reset() to do nothing at all. By > creating another method to mimic the reset, I now call reset when it's more > advantageous. > > > >I guess struts calls reset in order to save all > > your input and then does the validation > > I don't get that on two assumptions, (clarification appreciated.) > > 1) Isn't reset() to clear out old data from a bean being recycled, as > opposed to a method for saving that old data? > 2) Isn't the very role of validating to prevent unruly, non-conforming data > from being saved? > > Loren > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 22, 2003 1:47 PM > To: [EMAIL PROTECTED] > Subject: RE: Why is the reset method called when I submit the form? > > > I guess struts calls reset in order to save all your input and then does the > validation > > Regards, > > > PQ > > "This Guy Thinks He Knows Everything" > "This Guy Thinks He Knows What He Is Doing" > > -----Original Message----- > From: Jeremy Cavagnolo [mailto:[EMAIL PROTECTED]] > Sent: January 22, 2003 2:53 PM > To: [EMAIL PROTECTED] > Subject: Why is the reset method called when I submit the form? > > It seems that when I submit my form, the reset method is called before > the validate method. I am using struts 1.0.2. > > Any insight? > > -Jeremy > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

