Pull request for invalid event changes to handler service


invalidEvent override needs to override the invocation path as well as the handler and method since the invalid event handler might not be in the save invocation path as the original event being requested. (It could be in a module for that matter)

This change is what I really should have done when I submitted my original pull request for having an invalid event handler in an external location. My original fix worked for missing handlers, but not for missing events when the invocation path of the request event did not match that of the missing event handler.

Basically, the invalidEvent method needs to re-do all the logic in getRegisteredHandler and not just set in the new handler and event. getRegisteredHandler used to always just create a new ehBean, but since that bean is passed by reference all the way from the controller I HAVE to override it and not create a new one. For that reason I modified getRegisteredHandler to accept an existing ehBean to override as an optional argument.



Any feedback on this Luis?



Yes I discovered even other bugs here. I am going to the drawing board on this.

Ok, will commit now a revised edition of how on invalid event works.

It now supports this event be anywhere, not only in the parent app but modules too. It finds the right event thanks to Brad’s contributions.

Also, you do not have to worry about the invocation paths when overriding it via the onInvalidEvent interceptor.

You can just setup the following:

That’s it. We will discover it accordingly.


Luis F. Majano
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