struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donie Kelly <donie.ke...@tecnomen.ie>
Subject RE: Pre-populating a form from a database
Date Thu, 02 Dec 2004 16:56:31 GMT
Hi (and sorry for the noob question)

I am using a DTO object to transfer the data from the data access object. I
copy that data from the Dto to the form in the action class and it works
when I resubmit the page (refresh) becuase the action is triggered.

However, I can't get the action to trigger when I go to the form initially.
I am a bit lost on this one even though I'm trying to understand these
tutorials.

Thanks
Donie


-----Original Message-----
From: Jim Barrows [mailto:jbarrows@sssc.com] 
Sent: 02 December 2004 16:59
To: Struts Users Mailing List
Subject: RE: Pre-populating a form from a database

The form bean is a not a data access object!!!!!!!
Get the data in the action class, populate the form bean from that.
FormBeans are for display only.

> -----Original Message-----
> From: Donie Kelly [mailto:donie.kelly@tecnomen.ie]
> Sent: Thursday, December 02, 2004 9:43 AM
> To: Struts Users Mailing List
> Subject: Pre-populating a form from a database
> 
> 
> Hi all
> 
>  
> 
> I've been going through the tutorials at
> http://www.coreservlets.com/Apache-Struts-Tutorial/index.html
> <http://www.coreservlets.com/Apache-Struts-Tutorial/index.html
> >  which shows
> how to pre-populate forms.
> 
>  
> 
> However, as I'm new to this, is there a "proper" way to 
> access the database
> through the form bean? Sould I put code in the form 
> constructor class to
> initialise the data? Or does struts have a better way?
> 
>  
> 
> Thanks
> 
> donie
> 
> 

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

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


Mime
View raw message