Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run Coldbox events outside of a Coldbox request
<cfoutput>#application.cbController.runEvent(event="MyHandler.myEvent",eventArguments={widget=true})#</cfoutput>
component extends="coldbox.system.EventHandler" {
function myEvent(event,rc,prc,widget=false) {
prc.message = "Test from Coldbox event";
if (arguments.widget) {
return renderView("main/myView");
}
event.setView("main/myView");
}
}
<cfoutput>#prc.message#</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment