Probably because you are using a variety of undocumented badness :o(

getMemento() , switching out the inner object if a Decorator... all sounds
pretty bad if you ask me.

I think Bob's approach of using his memento function is probably the way to
go.

Mark


On Fri, Nov 6, 2009 at 6:07 AM, Jim Rising <[email protected]> wrote:

> ok... so here is what I did in my decorator:
>
>     <cffunction name="copyContentTemplate">
>         <cfargument name="contentTemplate"
> type="transfer.com.transferObject" required="true">
> <cfset var contentTemplate = arguments.contentTemplate>
>         <cfset var content = getTransfer().get("content.Content", "")>
>
>         <cfset content = setTransferObject(contentTemplate)>
>     </cffunction>
>
> now... this does seem to copy a 'contentTemplate' TO into a 'content' TO
> without any issues, but when i attempt to save using the following:
>
>     <cffunction name="saveContent" access="public" returntype="any">
>         <cfargument name="content" type="transfer.com.transferObject"
> required="true">
>         <cfset var content = arguments.content>
>
>         <cfset getTransfer().save(content)>
>
>     </cffunction>
>
> the object does not save.
>
> any ideas?
>
> -jim
>
>
>
> On Thu, Oct 29, 2009 at 11:21 AM, John Watson <[email protected]> wrote:
>
>> Someone who knows a little more detail about how the caching works may say
>> what I suggest is a bad a idea, but here's a method I've used with no issues
>> yet.
>>
>> Inside the decorator I've used the TO.setTransferObject(otherTO) method.
>> Though both the setting object and the TO object are both the same (IE:
>> content/content).
>>
>> Another idea may be to use setMemento(mementoStruct)
>>
>> John
>>
>>
>> On Thu, Oct 29, 2009 at 09:10, Jim Rising <[email protected]>wrote:
>>
>>> I'm needing to copy one TO to another TO, and wondered if anyone had any
>>> ideas on the best way to do that? Basically I have one TO that needs to
>>> serve as a 'template' of another.
>>>
>>> Example:
>>>
>>> I have a TO called 'contentTemplate' and another called 'content'.
>>> I want to be able to create a 'content' object from the 'contentTemplate'
>>> object.
>>>
>>> I'm thinking I will need to just get / set everything between each of
>>> them, but was hoping I would have another option available.
>>>
>>> Thanks!
>>> --
>>> Jim Rising
>>> Serial Entrepreneur
>>> Software Engineer
>>> Web Developer
>>>
>>> "Knowledge work requires both autonomy and accountability."
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Jim Rising
> Serial Entrepreneur
> Software Engineer
> Web Developer
>
> "Knowledge work requires both autonomy and accountability."
>
> >
>


-- 
E: [email protected]
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to