We are utilizing an interceptor to detect certain event names and, for
certain scenarios, perform an overrideEvent(). We have a great many
runEvent() calls throughout our application.
In the Coldbox controller.cfc, v2.63, function "runEvent", line 411:
<!--- Verify if event was overridden --->
<cfif (arguments.default) and (arguments.event neq
oRequestContext.getCurrentEvent())>
This line fires *after* the preEvent interception call. We have, in
the preEvent interception point, performed overrideEvent(). However,
because of the "arguments.default" condition, which defaults to false,
the controller doesn't repopulate the oEventHandlerBean and
oEventHandler objects on line 414 and416, respectively. Therefore,
the event isn't *really* overridden, just the name in the event, not
what the runEvent() command actually tries to process.
We tried fiddling with the flag, but on some occasions, even though
this is the last interceptor in the chain, we would get errors about
things not being available in the rc that we had set in prior
interception points. To be clear, the other interception points are
all preProcess, whereas this one is preEvent.
preEvent runs for each individual runEvent call that is executed. I
would say that it seems that preEvent fires before preProcess, but I
can't really nail it down.
Am I missing something about the way overrideEvent() is supposed to
work and why this condition of arguments.default is affecting it? (We
cannot pass in that arg as "true" because our call is to the one in
frameworkSuperType, not the one directly in the controller.)
- Will B.