Of course I can’t find my example at the moment, but I know I had a case in the past where I tried passing the form scope into a method and I had to wrap it in either StructCopy() or Duplicate() to get it to behave properly.  Sean Corfield blogged about some of that issue:

 

http://www.corfield.org/blog/index.cfm/do/blog.entry/entry/Scope__Struct

 

 

Nolan Erck
Web Developer/Programmer
Schools Financial Credit Union
(916) 569-5409 Office
(916) 569-2024 Fax
www.schools.org

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Stoner
Sent: Wednesday, March 29, 2006 12:43 PM
To:
[email protected]
Subject: Re: [CFCDev] passing from values to bean

 

That is certainly true about the scopes being different then structures but in the context of this example the differences are not an issue.  I use this technique quite often with the arguments, form and url scopes with no ill effects.


On 3/29/06, Joe Ferraro <[EMAIL PROTECTED]> wrote:

I don't know if this is worth mentioning.

I remember back in the day talking about the arguments scope and noting that though it looks like a struct it is actually a scope and doesn't exactly work the same way. I don't know if that has changed at in the new release of CF. Since form is a scope too I wonder if you would encounter any struct related incompatability issues there. The issues were minor. I think something like the key count returning different numbers based on if you were using ver 6 or 7

 

On 3/29/06, Chris Stoner < [EMAIL PROTECTED]> wrote:

The form itself is a struct.  As long as the field names match the argument names in your setMomento method you can do something like this:

myBean.setMomento( argumentscollection:form )

 

On 3/29/06, David Mineer <[EMAIL PROTECTED]> wrote:

I am missing something simple here, but what is the easiest way to
pass form field values to a bean.

I have a bean and I initialize it with default values.  The form is
populated with those default values.  When the form is submitted I
want the bean to be updated with the new values.

Do I loop over the form.fieldnames variable and use the bean setters.

How do I incorporate the setMemento way.  Would that be appropriate
here.  Is there a struct of form.fieldnames that I can use.

Tia

--
David Mineer Jr
---------------------
The critical ingredient is getting off your butt and doing
something. It's as simple as that. A lot of people have ideas,
but there are few who decide to do something about them now.
Not tomorrow. Not next week. But today. The true entrepreneur
is a doer.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

The information contained in this e-mail is confidential and may contain privileged information exempt from disclosure under applicable law. The information is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, employee, or agent responsible to deliver it to the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please delete the message from your computer and immediately notify the sender by telephone (you may call collect) at 916-569-5400 or by e-mail to [EMAIL PROTECTED] Thank you. ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to