Just a quick question, why do I need to do this
If I was going to name it something completely different (AwesomeBeanFactory) I could understand the need for the inject attribute but if its wiring by name shouldn’t I just be able to do this
Just a quick question, why do I need to do this
If I was going to name it something completely different (AwesomeBeanFactory) I could understand the need for the inject attribute but if its wiring by name shouldn’t I just be able to do this
I believe shorthand only works with models. So you could do:
property name='siteService' inject;
In this case the lookup order is:
Explicit model mapping
Base application model directory
Modules model directories
which is the same as:
property name='siteService' inject="model:siteService";
Otherwise I believe you'll have to use the full DSL. I'm not 100%
sure though, maybe Luis can confirm.
.brett
In order to do what you want you will have to use the new WireBox integration. I am completing the docs at the moment, but it relies on the fact that you can alias any type of object construction, wether it may be a cfc, java, webservice, dsl, etc.
However, you will still need the inject annotation to tell wirebox where to inject.
I am working on the docs but you can be checking them out here: http://wiki.coldbox.org/wiki/WireBox.cfm
Also, check out the new application templates that show the new wirebox configuration binder.
you can do the following to map objects via dsl in the new configuration binder:
map(“awesomeBeanFactory”).toDSL(“coldbox:plugin:BeanFactory”);
THen you can use the mapping alias anywhere you can inject or via the programmatic config.
I don’t want to have manage mappings for them like that. I will check out wirebox though, it was on my list but I am still catching up on the core of the framework