Here comes the fun part. If you pass in attributeCollection via a
cfscript type call, it doesn't work, but it DOES work in cfinvoke. See:
<cfset o = createObject("component","alpha")>
<cfset s = structNew()>
<cfset s.alpha = "Modded alpha">
<cfset goo = o.test(attributeCollection=s)>
<cfdump var="#goo#">
<cfinvoke component="#o#" method="test" attributeCollection="#s#"
returnVariable="foo">
<cfdump var="#foo#">
First call doesn't work, second does. Of couse, both of these work:
<cfset o = createObject("component","alpha")>
<cfset s = structNew()>
<cfset s.alpha = "Modded alpha">
<cfset goo = o.test(argumentCollection=s)>
<cfdump var="#goo#">
<cfinvoke component="#o#" method="test" argumentCollection="#s#"
returnVariable="foo">
<cfdump var="#foo#">
========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)
Email : [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Andre Mohamed
> Sent: Monday, August 11, 2003 7:28 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Invoke cached components via cfinvoke
> without evaluate
>
>
> Interesting...I guess attributeCollection works because you
> can pass in your own structure to the CFC/UDF (and therefore
> you can call it whatever you want) but when doing so I'd be
> very surprised to see the attributes in the "collection"
> being mapped to the appropriate arguments declared in the
> UDF/Method as would be the case with argumentCollection.
>
> Limited testing seems to confirm this. Never ran into the
> argumentCollection bug though.
>
> Andr�
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Camden
> Sent: 11 August 2003 12:49
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Invoke cached components via cfinvoke
> without evaluate
>
> I think attributeCollection works in CFC/udf calls as well -
> it was useful when there was the bug with argumentCOllection.
> Not 100% sure though.
>
> ==============================================================
> ==========
> ===
> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> (www.mindseye.com)
> Member of Team Macromedia
> (http://www.macromedia.com/go/teammacromedia)
>
> Email : [EMAIL PROTECTED]
> Blog : www.camdenfamily.com/morpheus/blog
> Yahoo IM : morpheus
>
> "My ally is the Force, and a powerful ally it is." - Yoda
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Andre Mohamed
> > Sent: Monday, August 11, 2003 5:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [CFCDev] Invoke cached components via cfinvoke
> > without evaluate
> >
> >
> > Ditto what Raymond said except...minor point just so you don't get
> > confused:
> >
> > You use argumentCollection for CFC's and attributeCollection
> > for Custom Tags.
> >
> > Andr�
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Camden
> > Sent: 11 August 2003 12:23
> > To: [EMAIL PROTECTED]
> > Subject: RE: [CFCDev] Invoke cached components via cfinvoke
> > without evaluate
> >
> > Errr why not just
> >
> > <cfinvoke component="#application.components.cmp_security#" .... >
> >
> > The component attribute of cfinvoke can be either a path to a
> > CFC or the CFC instance itself.
> >
> > As for using, cfset xxxxx.method(....), do not forget you can
> > use an attributeCollection to dynamically pass attributes.
> >
> > ==============================================================
> > ==========
> > ===
> > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> > (www.mindseye.com)
> > Member of Team Macromedia
> > (http://www.macromedia.com/go/teammacromedia)
> >
> > Email : [EMAIL PROTECTED]
> > Blog : www.camdenfamily.com/morpheus/blog
> > Yahoo IM : morpheus
> >
> > "My ally is the Force, and a powerful ally it is." - Yoda
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> > > Behalf Of peter mayer
> > > Sent: Monday, August 11, 2003 2:57 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [CFCDev] Invoke cached components via cfinvoke
> > > without evaluate
> > >
> > >
> > > Hello!
> > >
> > > I am creating components in shared scopes (f.e. application or
> > > session).
> > >
> > > How can I now access these components using cfinvoke without the
> > > "evil" evaluate construct?
> > >
> > >
> > > <cfinvoke
> > > component="#Evaluate("application.components.cmp_security")#"
> > > method="LoadPermissions" returnvariable="a_return">
> > > <cfinvokeargument name="entrykey" value="gt3984g9384bg983b4">
> > > </cfinvoke>
> > >
> > > Using the simple way of
> > >
> > > <cfset
> > application.components.cmp_security.LoadPermissions('gt ....')>
> > >
> > > is not possible because the list of arguments is likely to change.
> > >
> > > Best regards,
> > >
> > > Peter
> > >
> > > --
> > > COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
> > > --------------------------------------------------
> > > 1. GMX TopMail - Platz 1 und Testsieger!
> > > 2. GMX ProMail - Platz 2 und Preis-Qualit�tssieger!
> > > 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7.
> > > daybyday - 8. e-Post
> > >
> > > ----------------------------------------------------------
> > > You are subscribed to cfcdev. To unsubscribe, send an email to
> > > [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in
> > the message
> > > of the email.
> > >
> > > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > > by Mindtool, Corporation (www.mindtool.com).
> > >
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
> > [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in
> the message
> > of the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > by Mindtool, Corporation (www.mindtool.com).
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
> > [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in
> the message
> > of the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > by Mindtool, Corporation (www.mindtool.com).
> >
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).