RE: Form Beans in Session

2006-06-05 Thread nageshkumar.siddu
Hi , Instead of putting every form bean in session, you can put custom VO in session. Example: Let Page1.jsp, Page2.jsp,Page3.jsp have FormBean1.java, FormBean2.java,FormBean3.java as beans and Action1.java ,Action2.java,Action3.java be the Action Classes respectively. Create BaseVO.java, OneVO

Re: Wizard page "data corruption" (was: "Re: Form Beans")

2005-11-16 Thread Michael Jouravlev
Oh, stupid me, you are talking about HTML FORM fields, while I was thinking about ActionForm fields. Returning to your case, the value does not seem "corrupted" to me. I think it is normal that different web pages of one wizard would share data. You display page 1, enter firstName, submit, it is s

RE: Wizard page "data corruption" (was: "Re: Form Beans")

2005-11-16 Thread bsimonin
asking? --Brad. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Wed 11/16/2005 11:46 AM To: Struts Users Mailing List Subject: Wizard page "data corruption" (was: "Re: Form Beans") Imagine you have a single ActionForm with a firstName fiel

Wizard page "data corruption" (was: "Re: Form Beans")

2005-11-16 Thread Frank W. Zammetti
Imagine you have a single ActionForm with a firstName field. Now imagine you have two wizard pages that are used in sequence, and you want to use the same ActionForm for both. Assume the form is stored in session, as you would expect in a wizard. Now, imagine there is a firstName field on bot

Re: Form Beans

2005-11-16 Thread Hubert Rabago
Well, I'm not Michael, but... On 11/16/05, Asad Habib <[EMAIL PROTECTED]> wrote: > Hello Michael. Thanks for your input. Doesn't this approach defeat the > purpose of using Struts though? I don't believe so. We're trying to make Struts more flexible and more extensible, and as a result we hope t

Re: Form Beans

2005-11-16 Thread Michael Jouravlev
Right, it is not "standard" Struts in terms of approach used. But it still is standard Struts because the library is just an add-on for Struts. It does not substitute any of Struts classes, it does not require you to use custom RequestProcessor, you don't have to use extended syntax in struts-confi

Re: Form Beans

2005-11-16 Thread Michael Jouravlev
On 11/16/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > The one thing to keep in mind if you go [one ActionForm] route is > to be sure you don't have a field on one page > with the same name as another. I had one junior developer make that > mistake and it drove him nuts trying to figure out w

Re: Form Beans

2005-11-16 Thread Asad Habib
Hello Michael. Thanks for your input. Doesn't this approach defeat the purpose of using Struts though? Simplicity is achieved but then the web app can no longer be considered a standard Struts app, can it? - Asad On Wed, 16 Nov 2005, Michael Jouravlev wrote: On 11/16/05, Asad Habib <[EMAIL P

Re: Form Beans

2005-11-16 Thread Frank W. Zammetti
If you go with the original intent of the ActionForm (as I understand it), the "canonical" answer would be that one HTML form should always map to one ActionForm. Today, people have used ActionForms in all sorts of "non-canonical" ways, and have found that some are better than others. For ins

Re: Form Beans

2005-11-16 Thread Michael Jouravlev
On 11/16/05, Asad Habib <[EMAIL PROTECTED]> wrote: > Hello. I am new to Struts and would like some advice. Is it better to use > one form bean to capture data from several forms that are being submitted > in succession or to use one form bean per form (i.e. multiple form beans)? > What are the adva

Re: Form Beans

2005-11-16 Thread Ed Griebel
If you will be calling the forms in succession, like in a workflow or "wizard" (for example, if form #2 will never be displayed except after form #1), I would definitely put them in a single formbean and then make the actions all session scope. If you don't you will end up doing a lot of copying of

RE: Form Beans

2005-11-16 Thread Ayusman dikshit
I think one form bean per form. Regards Ayusman -Original Message- From: Asad Habib [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 16, 2005 4:11 PM To: user@struts.apache.org Subject: Form Beans Hello. I am new to Struts and would like some advice. Is it better to use one form bean