How to use modelExternalLocations in Modules

As the subject implies, how do I go about this I have tried the

modelsExternalLocation = “system/services”,

And the conventions in the ModuleConfig and not getting anywhere.

Luis you mentioned somewhere about services, is this implemented at all and if so how is it used? If not how will it be used, and when will it be ready?

I prefer my services separate to my models, so any help will be appreciated.

Regards,

Andrew Scott

http://www.andyscott.id.au/

You mean how do you use models in modules? How to alias them? How to use them?

not sure what the question is?

Luis F. Majano
President
Ortus Solutions, Corp

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

The question is as it is, how do I set the location of modelsExternalLocation inside a module.

Regards,

Andrew Scott

http://www.andyscott.id.au/

well, the location is a setting in the parent. If you would like to add more discovery paths to the bean factory you can do so by calling the bean factory’s methods.

Luis F. Majano
President
Ortus Solutions, Corp

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

Do you mean like addModelMappings or something else?

Like I said I like to keep my models and services separate, and I want to do the same thing for my modules.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Well, a few things.

Every time a module is added to the running application, its {modulePath}/model folder is added to the external locations for package scanning automatically. If you would like for the module to add ANOTHER external custom location to the package scanning then you will have to do it by calling a method on the beanFactory plugin once your module loads using the “appendExternalLocations()” method

Luis F. Majano
President
Ortus Solutions, Corp

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

Ok that makes sense now.

I was thinking that there might have been a config option to do this.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Is the beanFactory inject into the ModuleConfig or is needed to be grabbed by the controller plugin method?

Regards,

Andrew Scott

http://www.andyscott.id.au/

Is the beanFactory inject into the ModuleConfig or is needed to be grabbed by the controller plugin method?

Regards,

Andrew Scott

http://www.andyscott.id.au/