Hello Folks,
I'm almost done with the Fusebox book (excellent job!) and working on a
few projects with CF. I've used CFTRY/CFCATCH before but I'm not sure
where to put them when using CF_BODYCONTENT. Should it be (a) or (b)?
(please see below)
Thanks in advance and Happy Thanksgiving!
Cheers,
Mart�n Cadirola
-----------------------------------------------------------------------
(a) A "home application" index.cfm:
<cfinclude template="app_globals.cfm">
<cf_bodycontent>
<cftry>
<cfparam name="attributes.fuseaction" default="">
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="blah">
this
</cfcase>
<cfcase value="blahblah">
that
</cfcase>
</cfswitch>
<cfcatch type="Any">
<cfinclude template="actions/act_InformProblems.cfm">
<cfinclude template="displays/dsp_Error.cfm">
</cfcatch>
</cftry>
</cf_bodycontent>
<cfinclude template="app_layout.cfm">
(b)
<cfinclude template="app_globals.cfm">
<cftry>
<cf_bodycontent>
<cfparam name="attributes.fuseaction" default="">
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="blah">
this
</cfcase>
<cfcase value="blahblah">
that
</cfcase>
</cfswitch>
</cf_bodycontent>
<cfinclude template="app_layout.cfm">
<cfcatch type="Any">
<cfinclude template="actions/act_InformProblems.cfm">
<cfinclude template="displays/dsp_Error.cfm">
</cfcatch>
</cftry>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts