[Coldbox 5.5][Lucee 3.2.9] Views/_partials/_messagebox.cfm

I would like to have the Views/_partials/_messagebox.cfm template to always relocate to the current page by default when a message is dismissed.


What link should I have under href=" " above in order to achieve this? Using href="#event.getCurrentHandler()#" or href="#event.getCurrentAction()#" trigger an error.


What is the error you are getting?

event.getCurrentEvent()will return the current executing event.

Hi Ryan,

Thanks for the feedback. Variable “EVENT” is not defined is the error message I get. The error is not surprising because the _messagebox.cfm view is not associated to any handler by default. I guess it is only within the specific action of a handler that I can define where to relocate a dismissed message.


If the messagebox is cfincluded directly then that would explain why it doesn’t have the event variable. You probably should have specifed what the error was in your original message. You can still get the event. Probably something application.cbController.getRequestService.getContext()