Title: RE: accessing framework from outside RC
Thread: accessing framework from outside RC
Forum: Need Help?
User: lmajano However,
You still need to be able to inject dependencies into your model and
they can be injected from ColdBox.
How are you managing your model?
creating it and saving it in a scope or are you using ColdSpring.
solutions for both and I usually use the settings of my coldbox.xml on my model,
because they ARE the settings of the application.
The separation that sana
talks about is about logic, not about settings.
Anyways, you can do that by
using the methods, getconfigBean or getsettingStructure to pass a configbean to
your model or a structure to it. You can also use the coldboxFactory if you are
using coldspring, so you can even inject the coldbox controller, interceptor
service and much more.
Let me know if you need more help on this issue.