Property Tag and D/I

16 views
Skip to first unread message

Phillip Duba

unread,
May 22, 2013, 1:12:36 PM5/22/13
to taffy...@googlegroups.com
If I want to use a CFC to D/I into my API CFCs what is the best way to do it while still doing "tag" development (sorry, still on a tag-only version, :) ). Also, do the other CFCs that will be D/I'd into the API have to exist in the same folder or can they be in another folder properly mapped? Thanks,

Phil

Adam Tuttle

unread,
May 22, 2013, 1:20:36 PM5/22/13
to taffy...@googlegroups.com
Taffy's built-in bean factory only looks at /resources, so if you want CFCs from another folder, you'll have to use ColdSpring or DI/1. It's been a while since I last worked on or used it this way, but I know you can use both /resources *and* a 3rd party bean factory together, I just don't recall what the limitations are. Best I can offer right now is the documentation:


As for DI with tags, just use the <cfproperty> tag:

<cfproperty name="someBeanName" />

Then your code can reference it as this.someBeanName.foo(). Just remember that properties go into the THIS scope, not the VARIABLES scope.

HTH,
Adam


Adam


On Wed, May 22, 2013 at 1:12 PM, Phillip Duba <phil...@gmail.com> wrote:
If I want to use a CFC to D/I into my API CFCs what is the best way to do it while still doing "tag" development (sorry, still on a tag-only version, :) ). Also, do the other CFCs that will be D/I'd into the API have to exist in the same folder or can they be in another folder properly mapped? Thanks,

Phil

--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Phillip Duba

unread,
May 23, 2013, 2:08:52 PM5/23/13
to taffy...@googlegroups.com
Ok, thanks Adam. We don't use bean factories here mostly because we've gone with the least complex setup so this will be something I'll have to figure out how we want to do it,

Phil
Reply all
Reply to author
Forward
0 new messages