Quoting Michael McGrady <[EMAIL PROTECTED]>: > > >Now let us assume that the ActionForm for the record editing form needs to > >go in session scope (nb: in request scope there is not a problem so if the > >design can be done practically with request scope that is much better). > > > Hi, Andrew, > > Now this is becoming interesting. Let's talk about this decision. If we > are taking data from a view, wouldn't it be paramount to make sure that the > what we got was from that view alone? What possible benefit would there be > to putting the ActionForm into session scope? >
The only reason a form bean should ever be in session scope is if you want it to preserve values across requests that are not included in the form on the current page. An example use case would be a wizard dialog that is composed of multiple pages, all updating the same form bean but containing different subsets of the fields. My recommendation is to *always* use request scope form beans if you can. Most of the reasons you might like to use session scope can be dealt with in other ways -- for example, the wizard dialog scenario can be addressed by simply including hidden input fields for all the fields that are not displayed on the current page of the wizard. > Michael Craig McClanahan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

