Re: How to Pre-fill a formbean

2002-03-15 Thread @Basebeans.com
Subject: Re: How to Pre-fill a formbean From: Pim [EMAIL PROTECTED] === This is exactly the answer I had in mind, except for the part to use class instead of type, I didn't know that. Casting your original loginForm to a mainForm won't work, you have to explicitly create a new mainForm

Re: How to Pre-fill a formbean

2002-03-15 Thread Joe Lee
to use class (not type) so that if you come from a differene route to main.jsp rather than Login and the mainform bean may not be there already, a new one will be created for u. Then your jsp won't bombs and the input fields still get blank defaults. - Joe RE: How to Pre-fill a formbean

RE: How to Pre-fill a formbean

2002-03-15 Thread Jay sissom
. the form bean that is instantiated will be empty unless you put data into it correct? -Original Message- From: Jay sissom [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 9:12 PM To: Struts Users Mailing List Subject: Re: How to Pre-fill a formbean The form bean has

Re: How to Pre-fill a formbean

2002-03-15 Thread Jay sissom
to use class (not type) so that if you come from a differene route to main.jsp rather than Login and the mainform bean may not be there already, a new one will be created for u. Then your jsp won't bombs and the input fields still get blank defaults. - Joe RE: How to Pre-fill a formbean

RE: How to Pre-fill a formbean

2002-03-15 Thread phil_hershkowitz
- From: Jay sissom [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 6:01 AM To: Struts Users Mailing List Subject: Re: How to Pre-fill a formbean You can do it this way, but I would use a Struts tag instead of a jsp tag. Instead of using jsp:useBean and jsp:getProperty, all you

RE: How to Pre-fill a formbean

2002-03-15 Thread Nekkalapudi, Viplava
, if it is not in the request/session. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 1:56 PM To: [EMAIL PROTECTED] Subject: RE: How to Pre-fill a formbean Hi All, And Thanks. So in my loginAction, I can create a reference to mainForm

RE: How to Pre-fill a formbean

2002-03-15 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)
-Original Message- From: Nekkalapudi, Viplava [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 12:14 PM To: 'Struts Users Mailing List' Subject: RE: How to Pre-fill a formbean // Create a form with the name given in struts-config.xml MainForm mainForm = new MainForm

RE: How to Pre-fill a formbean - correction

2002-03-15 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)
, 2002 4:10 PM To: 'Struts Users Mailing List' Subject: RE: How to Pre-fill a formbean Hi, In mainAction, where form is passed in by the method header, the code form.setProperty1(Dog); compiles. In loginAction, the code: MainForm mainForm = new MainForm

RE: How to Pre-fill a formbean - correction

2002-03-15 Thread Jay sissom
To: 'Struts Users Mailing List' Subject: RE: How to Pre-fill a formbean Hi, In mainAction, where form is passed in by the method header, the code form.setProperty1(Dog); compiles. In loginAction, the code: MainForm mainForm = new MainForm

How to Pre-fill a formbean

2002-03-14 Thread phil_hershkowitz
Hi, My jsp application begins at a login page. I call the login page action loginAction and I have defined loginForm to process the user details. If the login is successful, the action forwards to mainAction.jsp, whose form action is /mainAction Before I display the mainAction.jsp I want to

Re: How to Pre-fill a formbean

2002-03-14 Thread Jay sissom
The form bean has already been created by the time your mainAction perform method is called if you have defined the form bean in your struts-config.xml file. All you would do is this: mainForm mf = (mainForm)form; // where form is passed to the perform method mf.setProperty1(asdfasdf);

RE: How to Pre-fill a formbean

2002-03-14 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)
, Phil -Original Message- From: Jay sissom [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 6:12 PM To: Struts Users Mailing List Subject: Re: How to Pre-fill a formbean The form bean has already been created by the time your mainAction perform method is called if you

RE: How to Pre-fill a formbean

2002-03-14 Thread John Menke
To: Struts Users Mailing List Subject: Re: How to Pre-fill a formbean The form bean has already been created by the time your mainAction perform method is called if you have defined the form bean in your struts-config.xml file. All you would do is this: mainForm mf = (mainForm)form; // where form

RE: How to Pre-fill a formbean

2002-03-14 Thread HERSHKOWITZ,PHIL (A-Sonoma,ex1)
, 2002 6:28 PM To: Struts Users Mailing List Subject: RE: How to Pre-fill a formbean How do you know what record in the database this will retrieve? Where does it get it's data. the form bean that is instantiated will be empty unless you put data into it correct? -Original Message

RE: How to Pre-fill a formbean

2002-03-14 Thread John Menke
14, 2002 6:28 PM To: Struts Users Mailing List Subject: RE: How to Pre-fill a formbean How do you know what record in the database this will retrieve? Where does it get it's data. the form bean that is instantiated will be empty unless you put data into it correct? -Original

Re: How to Pre-fill a formbean

2002-03-14 Thread Lee Joe
to use class (not type) so that if you come from a differene route to main.jsp rather than Login and the mainform bean may not be there already, a new one will be created for u. Then your jsp won't bombs and the input fields still get blank defaults. - Joe RE: How to Pre-fill a formbean