> Thanks for your suggestion. FYI, there are already other
> ways to accomplish this. For example, see the attached CFC
> (which I stole out of Model-Glue).
>
>
> This will do exactly what you want. You simply init the CFC
> with a collection, in your case the form scope. You then
> call MakeBean() and pass in your record. The
> CollectionBeanMaker will take any elements out of your
> collection and use them to call setters on your record. For
> example, if your form had an element, firstName it would look
> for setFirstName on your record. If this exists it'll pass
> firstName into setFirstName.
>
> Pretty simple, eh?
Thanks for the response Doug. That's roughly what I was going to be doing
(though I'm sure not quite as elegant...). So in my page I'd do this?
<cfset User = CreateObject("component",
"CollectionBeanMaker").init(FORM).MakeBean(User) />
<cfset User.Save() />
Is that right? This seems like something that would fit nicely in one of the
Reactor base files to cut out the middle man, since it directly relates to
DAO business. If you still think it's best left to an outside component, I
won't pitch a fit :).
Dan
-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/