I just use the commons beanutils to copy all of the fields in my struts action forms (basically just user input collected into a bean) into my torque object. Magic!
Of course, this only helps if you're using struts... which you should ;) Josh ============================= JOSH HOLTZMAN Web Development http://joshholtzman.com ============================= -----Original Message----- From: Juan Pablo Liska [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 6:40 PM To: Apache Torque Users List Subject: utility of a setfields tool? I am working on a utility that would use the JavaNameGenerator and reflection to set all the fields in a data object given the object and the httpserveletresponse. two changes would be required for this to work with other people's torque: - have to modify the abstract class BaseObject so that it has a getPeer method. - have to change class generator so setters take an Integer argument rather than int does this seem worth while? have others found a way to accomplish the same thing (automatically set data coming from web pages)? oreodata from niggle (www.niggle.org) has some nice functionality in this department. when you call setfields, it validates the incoming data and populated the peristent object's fields. it saves a lot of code. --------------------------------------------------------------------- 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]
