Wirebox stumbling block

Today I was trying to inject a CFC into one of my Controllers and ran
into an issue that I was a bit stumped by. IoC and DI are still really
new to me and I'm sure I'm completely missing something obvious.

We are on the final release of ColdBox 3.0.

We have a model directory with a directory below that for base objects
named "_base". The _base directory has several cfc's in it.

In the controller I was trying to inject a specific object named
PermissionManager. I thought I could do the following:

property name="PermissionManager" inject="model:_base";

But anytime I tried to reference PermissionManager I would get an
error that it didn't exist. So then I thought maybe I could do:

property name="PermissionManager"
inject="model:_base:PermissionManager";

but still ran into the same error. Now if I moved PermissionManager
into the model directory and changed my property to:

property name="PermissionManager" inject="model";

It would get injected into the controller and could access all my
methods.

I read through the WireBox docs but still didn't completely understand
everything I was reading so I need to go back and read again.

Is there something else we need to set up to tell WireBox to scan
folders below the model folder?

Thanks,
Ben

You don't need the directory _base at all, just the name of the cfc.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of Ben Densmore
Sent: Thursday, 14 April 2011 4:48 PM
To: ColdBox Platform
Subject: [coldbox:9449] Wirebox stumbling block

Today I was trying to inject a CFC into one of my Controllers and ran into

an

issue that I was a bit stumped by. IoC and DI are still really new to me

and I'm

sure I'm completely missing something obvious.

We are on the final release of ColdBox 3.0.

We have a model directory with a directory below that for base objects
named "_base". The _base directory has several cfc's in it.

In the controller I was trying to inject a specific object named
PermissionManager. I thought I could do the following:

property name="PermissionManager" inject="model:_base";

But anytime I tried to reference PermissionManager I would get an error

that

it didn't exist. So then I thought maybe I could do:

property name="PermissionManager"
inject="model:_base:PermissionManager";

but still ran into the same error. Now if I moved PermissionManager into

the

I guess I'm not following what you mean. I tried just giving the name
of the cfc and it still never picks it up unless it sits directly in
the model directory.