[mailto:[EMAIL PROTECTED]
Skickat: den 29 september 2005 11:55
Till: user@struts.apache.org
Ämne: RE: prepopulating jsp page
I cannot do the following
CreateClientForm updateForm = (CreateClientForm)actionForm;
Because the action is called from a search page and has a
different form coming in. T
in page/request/session scope
4 return from action
5 in jsp, get the bean from the scope you put it in
> -Ursprungligt meddelande-----
> Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Skickat: den 29 september 2005 11:55
> Till: user@struts.apache.org
> Ämne: RE: prepopula
It seems I need to reformulate my answer.
You need to CREATE a form with data for your NEXT page for populating
the fields.
You can't retrieve the form from the actionForm parameter of the action.
So you create in the execute function a form like this :
CreateClientForm updateForm = new Creat
: prepopulating jsp page
In your struts-config.xml, add a
section
Then in your action,
if (form != null)
{
localvariable = (CreateClientForm)form
}
now you can build your form bean properties as localvariable.set metods.
Vijaya
-Original Message-
From: [EMAIL PROTECTED
ungligt meddelande-
> > Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Skickat: den 29 september 2005 11:38
> > Till: user@struts.apache.org
> > Ämne: RE: prepopulating jsp page
> >
> > Do this in your action:
> >
> >CreateCl
In your struts-config.xml, add a
section
Then in your action,
if (form != null)
{
localvariable = (CreateClientForm)form
}
now you can build your form bean properties as localvariable.set metods.
Vijaya
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:
Do this in your action:
CreateClientForm updateForm = new CreateClientForm();
// populate the bean here
// then
form = updateForm;
When you say
form = updateForm;
what is my variable form of type?
-Original Message-
From: Ekberg Mats KONSULT [mailto:[EMAIL PROTECTED]
Hi,
Did you put the new form into session or into
whatever-the-scope-of-the-form-must-be ?
If not, the error may come from that
Regards,
Cedric
[EMAIL PROTECTED] wrote:
Hi,
I am trying to pre-populate my JSP page with the values returned from
the database when a user edits a client. I hav
8 matches
Mail list logo