--Original Message-
> > From: HERSHKOWITZ,PHIL (A-Sonoma,ex1)
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 15, 2002 4:10 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How to Pre-fill a formbean
> >
> >
> > Hi,
> &g
1)
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 15, 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.setProperty
ger" struts to give me a reference to the formbean?
Phil
> -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
>
&
e main.jsp,
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 t
age-
> 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:us
at 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
does
> it get it's data. 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
> Subj
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 for
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
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 for
]]
> Sent: Thursday, March 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
ay, March 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
> em
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 have defined the form bean in your
struts-config.xml file.
All you would do is this:
mainForm mf = (mainForm)form;
// where fo
mainForm.
Thanks,
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 yo
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");
mf.
15 matches
Mail list logo