Keep in mind, it would be nice to have your form fields share the same name
and number of fields as your record, plus the usual discussion about
complexities involved if your form maps to multiple db tables...

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Short
Sent: Tuesday, February 28, 2006 6:12 PM
To: [email protected]
Subject: [Reactor For CF] Cutting out Repetive setXXX(FORM.XXX)


I've perused the Reactor docs and haven't seen anything that might lead me
to believe this is possible, but what I'd like to do is pass a Record a FORM
scope and have it run all of the set business. So if I want to update a User
I don't have to do this:

<cfset User.setFirstName(FORM.FirstName) />
<cfset User.setLastName(FORM.LastName) />
...
<cfset User.Save() />

Is there any built-in functionality to do this?

<cfset User.setInstance(FORM) />
<cfset User.Save() />

Or even:
<cfset User.Save(FORM) />

If that's not in there by default, I don't think it would be terribly
difficult for me to add myself. This would be done in the UserGateway.cfc in
my site folder correct?

Dan



 

-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

 

-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to