You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Steve Davis <st...@digitalevergreen.com> on 2001/10/17 19:25:45 UTC

Torque template proposal

I would like to suggest changing the Torque Object.vm template to
use a variation of the JavaName parameter to create the object field 
names instead of using the DB column name.  My reason for wanting to 
do this is so that bean introspection of the field name would find the
appropriate setters and getters.

I needed to do this because a client mandated using Struts and I 
wanted to use the O/R capability of Torque.  This change allowed
me to use the autogenerated objects from Torque directly as beans in 
the tag libraries of Struts. A co-worker of mine had already made this 
change in a 2.2 version of Turbine/Torque because of some introspection 
he was doing. I used his Object.vm as an example to make the changes to 
the latest 3.0 cvs version of Torque.  

Neither one of us is very familiar with Velocity so our solution is 
probably a hack, but I could submit a patch file as a starting point 
if others would find this useful.


Steven F. Davis

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Torque template proposal

Posted by Jon Stevens <jo...@latchkey.com>.
on 10/17/01 10:25 AM, "Steve Davis" <st...@digitalevergreen.com>
wrote:

> I would like to suggest changing the Torque Object.vm template to
> use a variation of the JavaName parameter to create the object field
> names instead of using the DB column name.  My reason for wanting to
> do this is so that bean introspection of the field name would find the
> appropriate setters and getters.

I'm confused. I thought we were already doing this.

> I needed to do this because a client mandated using Struts and I
> wanted to use the O/R capability of Torque.

FYI, You can use Velocity with Struts. :-)
    <http://jakarta.apache.org/velocity/veltag.html>

And a page to give to your client...
    <http://jakarta.apache.org/velocity/casestudy1.html>

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org