Created
November 8, 2016 18:12
-
-
Save jsteinshouer/98cd3cf3fccc250fbfab959802442960 to your computer and use it in GitHub Desktop.
Run Coldbox events outside of a Coldbox request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfoutput>#application.cbController.runEvent(event="MyHandler.myEvent",eventArguments={widget=true})#</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfoutput>#prc.message#</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment