You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Darrell B <wi...@rogers.com> on 2003/05/20 23:10:29 UTC
I need clarification
Hi,
This would be handy for my use since it is the forms data of my struts
project that I want to forward to the torque data objects.
I took this from the Peers-Howto but I am not sure of the line
data.getParameters().setProperties(itm);
Where is this ParameterParser object and RunData? It isn't located in
the torque api.
I saved the best for last. Say that you want to create a new database
entry from an html form. You can use the ParameterParser object (see the
getParameters method of RunData in the api docs) to automatically fill
in your fields. All that you need to do is to give your html form fields
the same name as the corresponding property in the generated Data
Object. For example a database field ITEM_ID will cause the generated
Data Object to have getItemId and setItemId methods. Here the property
name is ItemId, so that should be the form field name. Then you can have
code like this:
Item itm = new Item()
data.getParameters().setProperties(itm); ???
Object o = ItemPeer.doInsert(itm);
--
Darrell Bechtel, B.G.S., MCSE
Systems Manager
Metokote Corporation of Canada
1011 HomerWatson Blvd.
Kitchener, Ontario
Ph: (519)669-0559
Fax:(519)669-3635
http://www.metokote.com
Re: I need clarification
Posted by Darrell B <wi...@rogers.com>.
thanks, I have since discovered that, but it appears to be too time
consuming to abstract that functionality and make use of it with struts.
Eric Emminger wrote:
> Darrell
>
> Darrell B wrote:
>
>> Hi,
>>
>> This would be handy for my use since it is the forms data of my
>> struts project that I want to forward to the torque data objects.
>>
>> I took this from the Peers-Howto but I am not sure of the line
>> data.getParameters().setProperties(itm);
>> Where is this ParameterParser object and RunData? It isn't located in
>> the torque api.
>
>
> It's Turbine.
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
--
Darrell Bechtel, B.G.S., MCSE
Systems Manager
Metokote Corporation of Canada
1011 HomerWatson Blvd.
Kitchener, Ontario
Ph: (519)669-0559
Fax:(519)669-3635
http://www.metokote.com
Re: I need clarification
Posted by Eric Emminger <er...@ericemminger.com>.
Darrell
Darrell B wrote:
> Hi,
>
> This would be handy for my use since it is the forms data of my struts
> project that I want to forward to the torque data objects.
>
> I took this from the Peers-Howto but I am not sure of the line
> data.getParameters().setProperties(itm);
> Where is this ParameterParser object and RunData? It isn't located in
> the torque api.
It's Turbine.
Eric