I also see no problem calling ActionForm.reset() when the form is created
via <html:form> for consistency sake.

-- Stoehr


-----Original Message-----
From: Roland Huss [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 05:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Calling ActionForm.reset() from <html:form> when creating a
bean


"Craig R. McClanahan" <[EMAIL PROTECTED]> writes:

> Bugzilla #2108 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2108>
> asks a very reasonable question -- whey isn't the reset() method called
> when a new form bean is created in the <html:form> tag?  After all, the
> controller servlet will always call reset() on the form bean (whether or
> not it is newly created) before calling populate() to copy the request
> parameters.

Recently I would indeed have needed this feature to initialize the
possible choices for multi-choice select box using <html:options>
attribute "property" to return a collection for the multiselect
box. But it since it wasn't called upon form creation, the list has
never been initialized. My solution was to use the "collection"
attribute which takes a collection put into the request by the
previous action, which after all was the cleaner solution anyway (no
logic within forms !). 

> This seems like a perfectly reasonable thing to add for 1.1.  My question
> is, what do folks think about making this change for 1.0 as well?  I'm
> more than a little concerned that it would break existing code, but the
> consistency argument might make doing this worthwile anyway.  (Of course,
> we would highlight this change in the Release Notes.).
> 
> What do you think?  Should we do this in 1.0 as well?

At the moment, I can't imagine any situation where it would harm to
call reset() upond form creation (or why it would be reasonable to
rely that it is *not* called). So, I would vote to include it in
1.0 as well....

cu...
-- 
                                                        ...roland huss
                                                             consol.de

Reply via email to