Leon, My biggest problem with session based forms is that, without a special mechanism, it prevents multiple instances of a form from being edited at once within a session.
Am I the only one with this concern? ;-) Paul -----Original Message----- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Thursday, May 12, 2005 3:20 PM To: 'Struts Users Mailing List'; 'Michael Jouravlev' Subject: Re: [POLL] What do you use action forms for? Well the question was, why to use ActionForm if a POJO will do it es well? And keeping current object in session isn't a solution to all problems... Just to give you an example, in our current application we have about 5000-7000 active session on each webserver. We have tons of object, so if we would keep _EVERYTHING_ in session, what amount of ram the server would need? Regards Leon > -----Ursprüngliche Nachricht----- > Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 12. Mai 2005 19:20 > An: Struts Users Mailing List > Betreff: Re: [POLL] What do you use action forms for? > > Oops, I don't know why did I mention going back again. I > guess, I am too fixated on that. I am sorry. > > Anyway, just to reiterate, I have a "current object" in the session. > "Current" means "currenty being used" whatever that means for you. > Object has an ID. I pass this ID to any action which uses this object. > It can be edit action, or view action or delete action or > store action. > > Returning to the book example. I don't know what the authors list for > :) But whatever, I would have two objects: book itself and > authors list. For the first page I would have two references > in the form bean: > to book object and to authors collection. When I select > author from a collection, its name would go to the book object. > > So, book is a "current object". I can edit it, view it, > persist it, delete it. It sits in the session, updated. If I > want to display a book on the next page, I just show the > book, which already has author in it. If I want to edit it, I > show it on edit page, and load the author collection again. > > And, returning to my object of fixation: if I go back to the > book edit page, the book will have author preset, simply > because I display the object's fields, not because I take > efforts to prepopulate form's fields. > > Right, this is another thing that I do not do: I do not > prepopulate form bean's fields. > > On 5/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > Summing all up, I can describe the approach I use: > <...deleted...> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]