Attributecollection can be used both with cfmodule and 'normal' cf_
custom tag calls. All it does is let you dynamically pass attributes to
a tag. As you know, you can't do this:

<cf_foo
        <cfif 1>
                x=1
        </cfif>
                y=1
>

But attributeCollection allows you to do this:

<cfset s = structNew()>
<cfif 1>
        <cfset s.x = 1>
</cfif>

<cf_foo attributeCollection="#s#" y=1>

Note - I didn't pass a struct... technically, I passed x=1. Kinda
confusing, but I think you can get the idea.
========================================================================
===
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: Marc Straka [mailto:[EMAIL PROTECTED] 
> Sent: Friday, July 11, 2003 5:53 PM
> To: Spectra-Talk
> Subject: CFMODULE and _contentObjectCopy_resolveOwnerIDs.cfm
> 
> 
> In the CF MX documentation, it says to use the 
> ATTRIBUTECOLLECTION attribute when passing a structure in a 
> CFMODULE tag. This seems to have been the cause of an error I 
> was getting on _contentObjectCopy_resolveOwnerIDs.cfm when I 
> was trying to publish an object. However, no where in the 
> Spectra 1.5.2 templates have I found the ATTRIBUTECOLLECTION 
> attribute in use with a CFMODULE tag. All the CFMODULE tags 
> that pass structures do it the old way as a simple, custom 
> named attribute. 
> 
> Does anyone know about this? Are there only rare instances 
> when a structure actually *needs* to be passed using the 
> ATTRIBUTECOLLECTION attribute?
> 
> The original code on cfa_contentObjectCopy.cfm was:
> --------------------------------------------------------------
> -------------------------------
> <cfmodule 
>       template="_contentobjectcopy_resolveownerids.cfm"
>       stObject="#stObjectCopy#"
>       ownerID="#attributes.copyObjectID#"
>       dataSource="#attributes.dataSource#"
> >
> --------------------------------------------------------------
> ------------------------------
> I changed it to:
> --------------------------------------------------------------
> ------------------------------
> <cfset temp = StructNew()>
> <cfset temp.stObject=#stObjectCopy#>
> 
> <cfmodule 
>       template="_contentobjectcopy_resolveownerids.cfm"
>       attributeCollection=#temp# 
>       ownerID="#attributes.copyObjectID#" 
>       dataSource="#attributes.dataSource#"
>       objectID="#stObjectCopy.objectID#"
>       typeID="#stObjectCopy.typeid#" 
> >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                        
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to