<cfcomponent
output="false"
hint="I define the application and event handlers.">
<cfset this.name = hash( getCurrentTemplatePath() ) />
<cfset this.applicationTimeout = createTimeSpan( 0, 0, 20, 0 ) />
<cffunction
name="onRequestStart"
access="public"
returntype="boolean"
output="false"
hint="I execute when a request needs to be initialized.">
<cfargument
name="template"
type="string"
required="true"
hint="I am the template that the user requested."
/>
<cfsetting
requesttimeout="10"
showdebugoutput="false"
/>
<cfset form[ "onRequestStart" ] = true />
<cfreturn true />
</cffunction>
<cffunction
name="onRequest"
access="public"
returntype="void"
output="true"
hint="I execute the page template.">
<cfargument
name="template"
type="string"
required="true"
hint="I am the template that the user requested."
/>
<cfinclude template="./index.cfm" />
<cfreturn />
</cffunction>
<cffunction
name="onMissingTemplate"
access="public"
returntype="boolean"
output="true"
hint="I execute when a non-existing CFM page was requested.">
<cfargument
name="template"
type="string"
required="true"
hint="I am the template that the user requested."
/>
<cfset this.onRequestStart( arguments.template ) />
<cfset this.onRequest( arguments.template ) />
<cfreturn true />
</cffunction>
<cffunction
name="onError"
access="public"
returntype="void"
output="true"
hint="I execute when an uncaught error has occurred.">
<cfargument
name="exception"
type="any"
required="true"
hint="I am the uncaught exception object."
/>
<cfargument
name="event"
type="string"
required="false"
default=""
hint="I am the event in which the error occurred."
/>
<h1>
Error:
</h1>
<cfdump var="#arguments.exception#" />
<cfabort />
<cfreturn />
</cffunction>
</cfcomponent>