RE: Re: Re: Re: [coldbox:18131] [coldbox 3.5.3] referencing plugin in configure() in wirebox.cfc

> try it.

Ok, I tried it and it works great. I created the following CFC

component accessors=“true” {
property name=“utilities” inject=“coldbox:plugin:utilities”;

function init(utilities) {
variables.utilities = arguments.utilities;

Then the following in my WireBox binder:


Then this test code:

writeDump(getModel(“brad”).getUtilities()); abort;

It dumps out an instance of the utilities plugin just like I expect.

I have no clue why it isn’t working for you. I can only assume that perhaps you’re not setting the utilities plugin into the variables scope in your init so the implicit getter can access it.

Also, please note- I didn’t need to create any plugin instances in the actual binder. All that is necessary is the DSL. WireBox will actually create the plugin instance when it needs to.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

I’ll try this tomorrow. thanks.

Just looking at your snippet, I see what the issue is. I was assuming that Wirebox was calling the setters on the properties.

I did not know I had to call the setters in the constructor.