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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]