Hi all,
I've read through the documentation and also other posts here
regarding DI and cfproperty and I believe I have tried just about
every configuration possible to get this to work, but I am still
having issues.
I am running CB 3.0.0 RC1 on Railo 3.2.0.003.
I have set up ModelMappings.cfm as follows:
addModelMapping(alias='AppService',path='AppService');
I have also tried the above without the alias tag, since it's the same
as the path, and also by specifying the path as 'model.AppService'.
I've also tried no mappings at all since everything is in the model
root anyway.
For AppService.cfc, I have the cfcomponent tag set up as follows:
<cfcomponent name="AppService" output="false">
I have also tried this with output=true and also by putting in some
cache settings.
My other model file is SiteService.cfc. The cfcomponent tag here is:
<cfcomponent name="SiteService" output="false">
and I have this cfproperty tag:
<cfproperty name="AppService" inject="AppService" scope="instance" /
I have also tried:
<cfproperty name="AppService" type="model" scope="instance" />
I have also tried changing the scope to "variables".
In my SiteService.init() function I attempt to reference a method in
the AppService object as follows:
variables.AppService.myMethodHere()
or
instance.AppService.myMethodHere()
I've also tried putting things into an argument tag within the
SiteService.init() function, but no luck there either.
I get the same error every time:
Error constructing model: model.SiteService
variable [APPSERVICE] doesn't existvariable [APPSERVICE] doesn't exist
at
railo.runtime.type.scope.UndefinedImpl.getCollection(UndefinedImpl.java:
404):404 at model.siteservice_cfc$cf.udfCall(/www/development/sunrise/
model/SiteService.cfc:14):14
... with a lot more after this
Can anyone help figure out what I am doing wrong?
Thanks,
Gary