see this in docs for a module's config:
function onLoad(){
// Register some tables in my database and activate some features
controller.getModel('MyModuleService').activate();
log.info('Module #this.title# loaded correctly');
}
getModel is not avail in controller.
i need access to the model or need to announce a custom interception
point.
You need to ask wirebox for the object.
Controller.getwirebox().get instance
Luis Majano
President
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408
www.coldbox.org
function onLoad(){
writeDump(Controller.GETWIREBOX());abort;
}
dumps an empty string.
Ahh you are using the IOC adapter right? Any reason of why you are using the adapter instead of model integration?
uses IOC & model.
this project was built using coldspring and im incorporating ORM (to
eventually phase out coldspring).
Ok, well, if you are using the ioc plugin, you need to talk to it then.
controller.getPlugin(“IOC”).getBean("")
Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com
Social: twitter.com/lmajano facebook.com/lmajano
when i completely remove the IOC, i'll revisit this piece.
thanks, luis.