RE: [coldbox:18244] [Coldbox 3.6.0] Question on getting data for none view related items in a layout.

And a follow up as to why it didn’t error. runEvent thought you were trying to do an implicit event dispatch since “/test/test_a” is also the path to a view so instead of erroring, it just ignored the runEvent call. Of course, runEvent, doesn’t actually dispatch the view, that’s taken care of by the renderer if the runEvent was the primary page request. If you call runEvent() directly with an event name that can be translated to a view, but not to a handler/action it gets ignored. There’s probably some room for improvement there. Feel free to enter any of the following tickets:

  • runEvent() only works with dots in the event name. Enhance to allow slashes.
  • HandlerService.getRegisteredHandler() (or at least, Controller.runEvent()) should probably error if no handler/action is found AND it was a direct runEvent call i.e. NOT from ColdBox.processColdBoxRequest() since implicit event dispatch is not going to happen. It is difficult to debug when runEvent simply returns nothing.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Ok that worked. It was the / and . difference. I am ok with it as long as I know that I need to look out for it.

It appears to be doing what I need and allowing me to widgetize the different areas of my layout.

Thank You for your help.