db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Holtzman" <j...@joshholtzman.com>
Subject RE: utility of a setfields tool?
Date Thu, 18 Sep 2003 03:18:18 GMT
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:jp@guatec.com] 
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: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


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


Mime
View raw message