root/codedepot/trunk/projects/ColdBox-3.0-Upgrader/AppTemplate/handlers/main.cfc @ 2077

Revision 2077, 2.5 kB (checked in by lmajano, 4 years ago)

The start of the groovy 3.0 upgrader

Line 
1<!-----------------------------------------------------------------------
2Author   :      Your Name
3Date     :      September 25, 2005
4Description :
5        This is a ColdBox event handler where all implicit methods can go.
6        Thus its the main handler.
7
8Please note that the extends needs to point to the eventhandler.cfc
9in the ColdBox system directory.
10extends = coldbox.system.EventHandler
11
12----------------------------------------------------------------------->
13<cfcomponent name="main" extends="coldbox.system.EventHandler" output="false">
14
15<!------------------------------------------- CONSTRUCTOR ------------------------------------------>
16
17        <!--- This init is mandatory, including the super.init(). --->
18        <cffunction name="init" access="public" returntype="main" output="false">
19                <cfargument name="controller" type="any">
20                <cfset super.init(arguments.controller)>
21                <!--- Any constructor code here --->
22                <cfreturn this>
23        </cffunction>
24
25<!------------------------------------------- GLOBAL IMPLICIT EVENTS ONLY ------------------------------------------>
26<!--- In order for these events to fire, you must declare them in the coldbox.xml.cfm --->
27       
28        <cffunction name="onAppInit" access="public" returntype="void" output="false">
29                <cfargument name="Event" type="any">
30                <!--- ON Application Start Here --->
31        </cffunction>
32
33        <cffunction name="onRequestStart" access="public" returntype="void" output="false">
34                <cfargument name="Event" type="any">
35                <!--- On Request Start Code Here --->
36        </cffunction>
37
38        <cffunction name="onRequestEnd" access="public" returntype="void" output="false">
39                <cfargument name="Event" type="any">
40                <!--- ON Request End Here --->
41        </cffunction>
42       
43        <cffunction name="onSessionStart" access="public" returntype="void" output="false">
44                <cfargument name="Event" type="any">
45                <!--- ON session start Here --->
46        </cffunction>
47       
48        <cffunction name="onSessionEnd" access="public" returntype="void" output="false">
49                <cfargument name="Event" type="any">
50                <!--- ON session End Here --->
51                <cfset var sessionScope = event.getValue("sessionReference")>
52                <cfset var applicationScope = event.getValue("applicationReference")>
53               
54        </cffunction>
55
56        <cffunction name="onException" access="public" returntype="void" output="false">
57                <cfargument name="Event" type="any">
58                <!--- ON Exception Handler Here --->
59                <cfscript>
60                        //Grab Exception From request collection, placed by ColdBox
61                        var exceptionBean = event.getValue("ExceptionBean");
62                        //Place exception handler below:
63
64                </cfscript>
65        </cffunction>
66
67
68</cfcomponent>
Note: See TracBrowser for help on using the browser.