component extends="coldbox.system.EventHandler" {
function index( event, rc, prc ) {
prc.welcomeMessage = "Welcome to ColdBox!";
event.setView( "main/index" );
* Produce some restfulf data
function data( event, rc, prc ) {
{ "id" : createUUID(), name : "Luis" },
{ "id" : createUUID(), name : "JOe" },
{ "id" : createUUID(), name : "Bob" },
{ "id" : createUUID(), name : "Darth" }
function doSomething( event, rc, prc ) {
relocate( "main.index" );
/************************************** IMPLICIT ACTIONS *********************************************/
function onAppInit( event, rc, prc ) {
function onRequestStart( event, rc, prc ) {
function onRequestEnd( event, rc, prc ) {
function onSessionStart( event, rc, prc ) {
function onSessionEnd( event, rc, prc ) {
var sessionScope = event.getValue( "sessionReference" );
var applicationScope = event.getValue( "applicationReference" );
function onException( event, rc, prc ) {
event.setHTTPHeader( statusCode = 500 );
// Grab Exception From private request collection, placed by ColdBox Exception Handling
var exception = prc.exception;
// Place exception handler below: