Dependency Injection not working for me


I am a newbie to ColdBox so please forgive me if I am overlooking
something very basic. However, I am having a hard time getting the
dependencies to inject into both my handlers and my model.

Here is one example that I am trying to work out. I need to get
access to event.BuildLink() inside my model, so I did the following:

1) I added <cfproperty name="modelRC" type="coldbox:requestService"
scope="instance"> at the top of the CFC
2) In the function I added:

<cfset var event = instance.modelRC.getContext() />


However I am getting an error that says that ModelRC is undefined. In
my Coldbox.cfc my IOC configuration is set as follows so I can use

//IOC Integration
    ioc = {
      framework = "coldspring",
      reload = true,
      objectCaching = false,
      definitionFile = "config/coldspring.xml.cfm"

Any help would be great as getting this to work has been the biggest
problem for me. I am thinking I have to be missing a setting
someplace but I could not figure out where.



Hi Jason,

In latest coldbox version the syntax is like this (type -> inject)
<cfproperty name="modelRC" inject="coldbox:requestService"

Which version of coldbox you are using ...?


Thank you for the reply. I did change that but it still did not want
to work for some reason.

So I have the following.

<cfproperty name="modelRC" inject="coldbox:requestService"

And I am dumping instance in one of the functions so I can see if
modelRC is created but it is not in the dump.

I am running ColdBox 3.0.0 (M6.2-318-GENESIS-14:14)