OOPhoto - A Painful Transition To Object-Based Controllers

<cfcomponent
	output="false"
	hint="I am a page controller.">
 
 
	<cffunction
		name="Execute"
		access="public"
		returntype="void"
		output="false"
		hint="I handle the page flow for this section.">
 
		<!--- Define arguments. --->
		<cfargument
			name="Data"
			type="struct"
			required="true"
			hint="I am the request data."
			/>
 
		<!--- Define the local scope. --->
		<cfset var LOCAL = {} />
 
 
		<!--- Define global web attributes for this section. --->
		<cfset ARGUMENTS.Data.Web.Template = "standard" />
 
		<!--- Check to see what our next action should be. --->
		<cfswitch expression="#ARGUMENTS.Data.Do[ 2 ]#">
 
			<cfcase value="src">
				<cfinclude template="_src_act.cfm" />
			</cfcase>
 
			<cfcase value="view">
				<cfinclude template="_view_act.cfm" />
				<cfinclude template="_view_dsp.cfm" />
			</cfcase>
 
			<cfdefaultcase>
 
				<!--- No valid action was requested. --->
				<cfthrow type="OOPhoto.InvalidAction" />
 
			</cfdefaultcase>
 
		</cfswitch>
 
		<!--- Return out. --->
		<cfreturn />
	</cffunction>
 
</cfcomponent>

For Cut-and-Paste