Because when you go from one page to another in a wizard, the properties
from the prior page can be reset. 

Select boxes and radio buttons would have one value or the other
submitted, and so resetting them is usually not important. 

Checkboxes if not set are not submitted at all. Sometimes when they are
toggled, the toggle is lost because a new checkbox parameter does not
come along to change true to false. Which is where the reset comes in :)

All this really only comes into play when ActionForms are stored in
session scope and persist between requests. Otherwise, a new form is
instantiated for the new request.

One approach to a wizard is to group the properties into pages, and pass
the page number as a hidden property. The reset and validation methods
can then use the page number to decide which set of properties to
validate. 

Mark Woon wrote:
> 
> Ted Husted wrote:
> 
> > Be sure your reset() method is not blindly resetting the properties. The
> > default reset() does nothing, but people often have it reset everything.
> > The only important thing to reset() is the checkboxes, since the
> > browsers do not resubmit these if they are unchecked.
> 
> It's also important to reset() select boxes.  I'd assume that radio buttons would
> fall into this category too.
> 
> Still, I don't see why it would be a problem to blindly reset everything though...
> 
> -Mark
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/

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

Reply via email to