Guys,
When browsing ContentBox source code (\modules\contentbox\models\comments\CommentService.cfc), I found the use of provider:ColdBoxRenderer which is something interesting and new to me. So, I wrote my own model in order to understand how provider:ColdBoxRenderer works.
`
// models/Test.cfc
component {
property name=“renderer” inject=“provider:ColdBoxRenderer”;
function init() {
return this;
}
function foo() {
return renderer.get().renderLayout(view = “/test/myView”);
}
}
// handlers/Test.cfc
component {
function foo(event, rc, prc) {
local.test = getModel(“Test”);
writeDump(local.test.foo());;
event.noRender();
}
}
`
When I called http://localhost/index.cfm?event=test.foo, I got the following error:
Type: Builder.DSLDependencyNotFoundException
Messages: The DSL Definition {REQUIRED={true}, DSL={id:ColdBoxRenderer}, NAME={}} did not produce any resulting dependency The target requesting the dependency is: ‘ExplicitCall’
Could you someone explain to me what did I miss?
Thank you!