If you are passing FormBean as VO and pass it to you DAO as param ... This will add dependency to you DAO layer..... meaning your DAO layer now depend on Struts, and can not be use by other application.
> -----Original Message----- > From: Sandeep Takhar [SMTP:[EMAIL PROTECTED]] > Sent: Saturday, May 11, 2002 2:09 PM > To: Struts Users Mailing List > Subject: Re: Forms Beans and DAO (Best Practices) > > may want to hold stuff that is not Strings, in the > form and not the dvo, because it may be in an invalid > format... > > sandeep > --- stuart robertson <[EMAIL PROTECTED]> wrote: > > Another approach to this is to have the form beans > > simply hold references to the value objects (from > > the > > DAO) directly. You can use the nested taglibraries > > that are now a part of struts 1.1 to access these > > when > > building html forms. The slick thing is that when > > the > > servlet populates the form before calling execute(), > > it will actually populate the value objects in the > > form themselves. It works by default for most data > > types, including Dates. But you can customize the > > converters used for just about any data type. > > > > Stu > > > > Original message: > > > > I am pre-populating a form with information from a > > data base. > > > > Is the following procedure acceptable, or is there > > another procedure > > that would be considered a "Best Practice"? > > > > Instantiate the form bean in the action class. > > > > Instantiate one or more DAO objects in the action > > class. > > > > Call methods in the DAO objects that would take the > > form bean as an > > argument and fill up the necessary fields. > > > > I understand the need to keep layers separate; > > however, if I am just > > trying to fill up the fields in a form, it seems > > unnecessary to have > > the DAO objects return data objects and then call a > > series of > > "get/set" methods to take the data from the data > > objects and put it > > in the form bean. > > > > Thanks. > > > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Health - your guide to health and wellness > > http://health.yahoo.com > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > __________________________________________________ > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience > http://launch.yahoo.com > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

