Thanks.  What I ended up doing was just creating a structure identical to
the object and just using <cfa_contentObjectData>... to update the field.
It took care of creating the array of these objects.

Mary


                                                                                       
                                     
                    "Benjamin Elmore"                                                  
                                     
                    <benjamin.elmore@remot        To:     Spectra-Talk 
<[EMAIL PROTECTED]>                     
                    esite.com>                    cc:                                  
                                     
                                                  Subject:     RE: Arrays of Embedded 
Objects                               
                    02/11/01 01:37 PM                                                  
                                     
                    Please respond to                                                  
                                     
                    spectra-talk                                                       
                                     
                                                                                       
                                     
                                                                                       
                                     




Mary,

If you are going for an shared embedded you call the
<cfa_contentObjectCreateEmbeddedFromOriginal> tag after the code below:

<cfa_contentObjectCreateEmbeddedFromOriginal
     datasource="suppContent"
     originalObjectId="#r_stFTPID#"
     objectId="parentUUID.property[indexpos]"
>

If you want a fully embedded object replace the <cfa_contentObjectCreate>
tag with the following:

<cfa_contentobjectcreate
     datasource="suppContent"
     typeID = "#FTPServerTypeID#"
     objectId="parentUUID.property[indexpos]"
     stProperties = "#stFTPServer#"
     label = "#obj[objectid].url#"
     r_id = "r_stFTPID"
>

What this does is create the object inside of another one.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 11:23 AM
To: Spectra-Talk
Subject: Arrays of Embedded Objects


My brain must be gone, I can't remember how to create an array of embedded
objects:

I have an object that has a property of an array of objects.

I create the structure to hold the fields of the object, then create the
new object.
<cfscript>
     stFTPServer = structnew();
     stFTPServer.ftpservername = "#obj[objectid].ftpservername#";
     stFTPServer.location = "North America East Coast";
     stFTPServer.url = #obj[objectid].url#;
     stFTPServer.realURL = "#obj[objectid].realURL#";
</cfscript>
<!--- create contentobject of this structure --->
<cfa_contentobjectcreate
datasource="suppContent"
typeID = "#FTPServerTypeID#"
stProperties = "#stFTPServer#"
label = "#obj[objectid].url#"
r_id = "r_stFTPID"
>

Now I need to embed this object into my current object as an array.  This
is why I get stumped.
Can someone show me the code to embed the new object into the parent object
as an array?

Mary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
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