Re: reset method in ActionForm

2006-01-03 Thread Andre Van Klaveren
Q: When exactly this method has to be used and when does this get called? A: The reset method is called for each new request, for both request and session scoped ActionForms, before the ActionForm is populated from the request. Here's the sequence of events: 1. Request received by controller. 2.

Re: reset method in ActionForm

2006-01-03 Thread Ted Husted
On 1/3/06, Niall Pemberton <[EMAIL PROTECTED]> wrote: > Reset gets called just before the form is populated and the most common use > is for resetting boolean properties set using checkboxes. This is because if > the checkbox is not "checked" browsers do no submit a value, so the > "population" mec

Re: reset method in ActionForm

2006-01-03 Thread Niall Pemberton
Reset gets called just before the form is populated and the most common use is for resetting boolean properties set using checkboxes. This is because if the checkbox is not "checked" browsers do no submit a value, so the "population" mechanism doesn't set the property to "false" if the checkbox is

reset method in ActionForm

2006-01-03 Thread fea jabi
When exactly this method has to be used and when does this get called? Why do the checkboxes have to be reset? Prepopulating the formbean is done in Action class. hence, it's not clear to me the exact use of using the reset method. Thanks.

Re: Reset Method in ActionForm

2005-02-26 Thread Larry Meadors
IMO, no. That should be done in the action as needed. The reasoning for that is that if you want to reuse the action form for multiple actions (like with a DispatchAction), no matter what you do, you are rebuilding the lists which will lead to performance degradation. If you are using the action

Re: Reset Method in ActionForm

2005-02-25 Thread Jeff Beal
I think that the best sentence to explain when to use the reset method comes from the JavaDoc: "In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form." Based on that, I would say that your usage is an inconsistent usage of the reset()

Reset Method in ActionForm

2005-02-25 Thread Evan Cooney
I am using the reset method in my actionForm classes to get collections of beans, and then putting them in the request. The JSPs then pull those beans out to dynamically populate HTML select lists. It works fine, but I'm wondering if this is the appropriate way to do such a thing? Thanks, eva

Reset Method in ActionForm

2005-02-25 Thread Evan Cooney
I am using the reset method in my actionForm classes to get collections of beans, and then putting them in the request. The JSPs then pull those beans out to dynamically populate HTML select lists. It works fine, but I'm wondering if this is the appropriate way to do such a thing? Thanks, eva