I've just taken a shot at implementing this feature. All of the heavy lifting is done by /ModelGlue/gesture/module/XMLModuleLoader.cfc, and looking at the way ModelGlue.xml is parsed, it appears that multiple <event-handlers> blocks (indeed most xml nodes) can already appear more than once, so no change needed there. To implement the defaultType attribute only needed 2 tiny tweaks, see the attached diff.
heres a quick example of the xml <event-types> <event-type name="MyDefaultEventType"> <after> <results> <result do="template.main" /> </results> </after> </event-type> <event-type name="AnotherEventType"> <after> <results> <result do="template.different" /> </results> </after> </event-type> </event-types> <!-- declares the default event type --> <event-handlers defaultType="MyDefaultEventType"> <!-- inherits the defaultType --> <event-handler name="page.1"> </event-handler> <!-- overrides the defaultType and only gets AnotherEventType --> <event-handler name="page.2" type="AnotherEventType"> </event-handler> <!-- removes the defaultType --> <event-handler name="page.3" type=""> </event-handler> </event-handlers> <!-- no default type declared --> <event-handlers> <!-- apply event type individually --> <event-handler name="page.3" type="AnotherEventType"> </event-handler> </event-handlers> Anyway, take a look, try it out and let me know if anything blows up :) Chris --~--~---------~--~----~------------~-------~--~----~ 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 . -~----------~----~----~----~------~----~------~--~---
XMLModuleLoader.cfc.diff
Description: Binary data
