At 01:24 PM 7/11/2000 +0200, you wrote:
>[newly created objects are not active]
> > As an aside, why does Spectra do it this way round? Surely most of the
> > time you are creating an object in order to use it.
>There is a time window during which an object is created but the methods
>that modify it have not yet been called. You do not want objects that are
>in this state to appear anywhere, hence the active flag. (I guess this is
>the logic behind it.)
>The cfa_contentobjectcreate tag has a bActivate attribute that supposedly
>activates the object automatically.


Hi,

I didn't see 'cfa_contentObjectCreate' has 'bActive'
(see Page 45 of Allaire Spectra Reference).

What I do is

[1] set

  stThisObj.ATTR_ACTIVE="1" before create object

<cfset stThisObj=structnew()>

<cfscript>
stThisObj.something1="#form.something1#";
stThisObj.something2="#form.something2#";
stThisObj.ATTR_ACTIVE="1";
</cfscript>

         <cfa_contentObjectCreate
                 typeID="#typeid#"
                 dataSource="#request.myproject.datasource#"
                 label="#label#"
                 stProperties="#stThisObj#"
                 r_id="thisid">



[2] Or update <cfa_contentObjectProperty name="ATTR_ACTIVE" value="1">
after create immediately:

         <cfa_contentObjectCreate
                 typeID="#typeid#"
                 dataSource="#request.myproject.datasource#"
                 label="#label#"
                 stProperties="#stThisObj#"
                 r_id="thisid">


                 <cfa_contentObjectData
                 dataSource="#request.myproject.datasource#"
                 objectID = "#thisid#">
         <cfa_contentObjectProperty name="ATTR_ACTIVE" value="1">
                 </cfa_contentObjectData>


Cheers
xiaoying



                       **8**
                      {(0 0)}
            +----oOO---- *   -----------------------------------------+
            |    <cfa_userProfileFind                                 |
            |         datasourse="#request.cfa.datafield.datasource#" |
            |         username="Xiaoying Kong"                        |
            |         email="[EMAIL PROTECTED]"               |
            |         url="http://www.datafield.com.au/xiaoying/"     |
            |         r_stUserProfile="ColdfusionSpectraWAPLover"     |
            |    >                                                    |
            +-----------------oOO-------------------------------------+
                      |__|__|
                       || ||
                      ooO Ooo




------------------------------------------------------------------------------
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