Not everything is string... I am using tecnhnique that you r describing.. (though with hibernate on backside..)
And I don't have all string fields.. -----Original Message----- From: Robert Bowen [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 13:28 To: [EMAIL PROTECTED] Subject: BeanUtils copProperties with Struts and Torque? Hello. I am using Torque to generate the persistent classes for my web application. Torque generates these classes based on an xml file, in which you specify the table name, column name and column type. What I would like to do is use copyProperties() to copy from an ActionForm directly to my Torque-generated beans but of course, everything is a String in the ActionForm world, whereas in my persistence classes my date fields, for example, are Dates, not Strings, so copyProperties fails. I have been looking all over the jakarta web site, the archives of this mailing list, etc. People seem to be talking about creating a bean that acts as a go-between, a DTO I suppose, that has the same fields, getters and setters as the ActionForm, and that you first copy the properties to the DTO. But ... won't I have the same problem when trying to use copyProperties? Do I have to somehow use the ConvertUtils instead? Any help much appreciated. I am using a single servlet to instantiate a bean of type 'x', copy the values from a form and save it in the database, so having to type 'gets' and 'sets' for every possible case ... is a waste of time, bad design, etc. Many thanks! syg __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- 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]
