Tony, Regarding your autowiring issues with the default MG controller... the following process SHOULD allow you to superimpose a new extension class with a method override on top of the original config loader in the application-specific bean factory. Since it's in the most specific beanfactory config file (i.e. the application config), it should override the one used by ModelGlue itself. If not you may have to programmatically modify the bean factory while the application loads (which I believe should also be possible). In any case, what you desire to do is possible without modifying the frameworks core files, you just have to know what to do and where to do it.
If you're using MG:Unity, make a copy of /ModelGlue/unity/loader/ DefaultXMLEventLoader.cfc, make it extend the original DefaultXmlEventLoader.xml, remove everything but the loadControllers () method, remark out what was originally line 160 (<cfset autowireController(instance) />), and add the following line to the ColdSpring.xml file in your application's /config folder: <bean id="eventLoader" class="ModelGlue.unity.loader.XmlConfigurationLoader" /> Be sure to change the class to point to your new class. If you're using MG:Gesture, the same general process applies, but you need to look at /ModelGlue/gesture/module/XmlModuleLoader.cfc. For that matter, if you wanted, you could add an attribute to the controller config tag and add a check to the controller loader to look for autowire="false" and skip all the autowiring business. It's not likely that this will be used a lot, but it would make life easier for the edge cases such as yourself out there. I'm pretty sure you'd want this to be controller by controller and not a global switch in the framework config, but either way it would be pretty easy to do and could get you a patch in the MG distro. ;) I hope that's not too confused, but I'm running low on both Human Battery Power and caffeine. J On Dec 15, 2008, at 3:04 PM, Tony Nelson wrote: > > Makes sense and works, although I was planning on using the parent > bean factory for another purpose. Thanks for your help. > > -Tony > > On Dec 15, 2:01 pm, "Chris Blackwell" <[email protected]> wrote: >> You need to put the controller bean definitions in the parent bean >> factory >> coldspring.xml file. You should not have any variables in >> ModelGlue's >> coldspring.xml file. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en For more about Model-Glue, check http://www.model-glue.com . -~----------~----~----~----~------~----~------~--~---
