struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <j...@wendysmoak.com>
Subject Re: can someone help me?
Date Thu, 08 Jul 2004 19:22:31 GMT
From: "KEBE Cheikh Sil├┐ffffffffffe8ye" <galoyabe@yahoo.fr>
> In my editProspectAction.java, i do
> public ActionForward execute(
> ActionMapping mapping,
> ActionForm form,
                       ^^^^^

Populate the 'form' that is passed into the method, don't create a new one:

> form=new ProspectForm();
> form=prospect;
> request.setAttribute(mapping.getAttribute(),form);

Actually I'm not certain what's going on in those three lines.  Take a look
at the struts-example webapp, it shows how to pre-populate a form using
BeanUtils.copyProperties.

It goes something like...
1. read Value Object from database
2. copy matching properties over to form bean
3. forward to JSP

-- 
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message