[Coldbox-3.5.3] Model not showing up as expected when injected into plugin

wirebox configuration:


plugin cfc defines:

property name=“userservice” inject=“id:UserServices”;

plugin function:

local.checkuser = userservice.getbycredientials(argumentCollection=arguments);

but the plugin function keeps bombing claiming “userservice” is not defined. If I use UserServices outside the plugin, say using a getInstance from wirebox in some handler code, it works just fine so I know it’s not the service code that’s causing the problem, so it seems it’s the plugin. What am I overlooking?


Remove the ID and replace with model as per the Wiki docs. The ID from what I can tell is if you named the component with a DSL name like

property name=“userservice” inject=“id:UserServices@cb”;

Otherwise your best approach is

property name=“userservice” inject=“model:UserServices”;

But make sure you do re-init the application and framework when adding this stuff.

Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/113032480415921517411