Dave/Dan:

Thanks for your replies. Do you have any tips to create this serialize 
function? My CFC has some instantiation variables set (this.numberitems, 
this.cartType, etc) and those are really the only variables I want to 
serialize. I tried using CFWDDX with an input of "#variables#" and again with 
an input of "#this#" but all that was sent back were the functions of the CFC. 
I am just trying to prevent having to hardcode this variables in my serialize 
function when I am creating a structure of the data.

Tim

>Tim,
>
>
>CFMX 7 does not support serializing CFC components. What you'll need to do
>is manually build a serialize()/deserialize() method for your component.
>Using WDDX you could do this pretty easily just by copying all the
>properties into a WDDX packet.
>
>Heck, you could probably do something like:
>
><cffunction name="serialize">
>  <cfwddx action="cfml2wddx" input="#variables#" output="sWddx" />
>  <cfreturn sWddx />
></cffunction>
>
>I haven't test this, but worse case scenario is you just copy all the
>necessary information to rebuild this instance of the component in a
>structure an wddx that.
>
>Your deserialize method would just take the WDDX packet (or what format you
>use used) and would use that information to rebuild the instance.
>
>-Dan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236633
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to