Advertisement
Guest User

Untitled

a guest
Jun 28th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. component extends="coldbox.system.EventHandler"{
  2.  
  3.     // Default Action
  4.     function index(event,rc,prc){
  5.         prc.welcomeMessage = "Welcome to ColdBox!";
  6.         event.setView("main/index");
  7.     }
  8.  
  9.     // Do something
  10.     function doSomething(event,rc,prc){
  11.         relocate( "main.index" );
  12.     }
  13.  
  14.     /************************************** IMPLICIT ACTIONS *********************************************/
  15.  
  16.     function onAppInit(event,rc,prc){
  17.  
  18.     }
  19.  
  20.     function onRequestStart(event,rc,prc){
  21.  
  22.     }
  23.  
  24.     function onRequestEnd(event,rc,prc){
  25.  
  26.     }
  27.  
  28.     function onSessionStart(event,rc,prc){
  29.  
  30.     }
  31.  
  32.     function onSessionEnd(event,rc,prc){
  33.         var sessionScope = event.getValue("sessionReference");
  34.         var applicationScope = event.getValue("applicationReference");
  35.     }
  36.  
  37.     function onException(event,rc,prc){
  38.         event.setHTTPHeader( statusCode = 500 );
  39.         //Grab Exception From private request collection, placed by ColdBox Exception Handling
  40.         var exception = prc.exception;
  41.         //Place exception handler below:
  42.     }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement