[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread whostheJBoss
With your code Bob (I had to piece it together from your site, so I'm posting the basic decorator here) I simply created abstractDecorator.cfc:

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread achebe
I just recently ditched cfinvoke for something similar to this:

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Cody Caughlan
I use this utility object to take a Struct of key/value pairs and call all setters on a given object which have a "setX" method where X is the name of a key in the Struct. http://gist.github.com/227407 Used like: BeanUtil.populateBean(someObject, someStruct); Might be a little slower due to it

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Bob Silverberg
Hmm, I've never even heard of listColumns(). If it were me, I'd use the metadata that Transfer makes available for just this purpose. In case you didn't see it, here's a link to a post I did about using Transfer's metadata to create your own implementation of getMemento(): http://www.silverwarecon

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Mark Mandel
+1 On Fri, Nov 6, 2009 at 8:23 AM, Bob Silverberg wrote: > I'm sure Mark will correct me if I'm mistaken, but I don't think you should > be calling setTransferObject() in your code. I'm guessing you could get > yourself into all kinds of trouble. > > -- E: mark.man...@gmail.com T: http://www.twi

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Jim Rising
what about listColumns() ? On Thu, Nov 5, 2009 at 3:23 PM, Bob Silverberg wrote: > I'm sure Mark will correct me if I'm mistaken, but I don't think you should >

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Bob Silverberg
I'm sure Mark will correct me if I'm mistaken, but I don't think you should be calling setTransferObject() in your code. I'm guessing you could get yourself into all kinds of trouble. On Thu, Nov 5, 2009 at 3:26 PM, John Watson wrote: > I'm actually running into issues of losing my decorator me

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread whostheJBoss
I came here today for the specific reason of asking this same question! Thanks! :) On Oct 29, 8:10 am, Jim Rising 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

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread John Watson
I'm actually running into issues of losing my decorator methods after using the setTransferObject(TO). I haven't had time to debug yet (as this is not a production app yet). I do this inside a "myDecoratedObject" called someobject: After running this code, randomly (haven't investigated

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Jim Rising
Mark, Thanks. I'll look into it a bit further. -jim On Thu, Nov 5, 2009 at 1:14 PM, Mark Mandel wrote: > 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

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Mark Mandel
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 Ris

[transfer-dev] Re: copy transfer object to another transfer object

2009-11-05 Thread Jim Rising
ok... so here is what I did in my decorator: 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: the object does not save. any