Nat, I thought putting your code at the end of the <cfswitch> statement was
a simpler solution, no?

</cfswitch>
<cfif IsDefined( 'XFA.onReturn' )>
  <cflocation url="#self#?fuseaction=#XFA.onReturn#">
</cfif>

That way you don't need to put it in every fuse. Same idea; just a little
easier to implement.

Hal Helms
Team Allaire
[ See www.halhelms.com <http://www.halhelms.com>  for info on training
classes ]


-----Original Message-----
From: Nat Papovich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 3:00 PM
To: Fusebox
Subject: RE: Surveying the community


I'm glad this thread died. It was hurting my head. But here's my flower,
which I know is brighter, more cheery, more perky, taller, bigger, smells
better, and would kick the crap out of all y'alls flowers combined. word.

all fuseactions with POTENTIAL exits look like this:
<cfcase value="fuseaction">
        <cfinclude template="act_DoSomething.cfm">
        <cfset xfa.exitone="funkadelic">
        <cfinclude template="act_DoSomething2.cfm">
</cfcase>
In this case, ONLY act_DoSomething2.cfm would be allowed to exit.
act_DoSomething.cfm would just pass control on to the next thing in the
index. This both is accomplished by all act files lookin' like this:

<!--- act_something.cfm --->
.....bunch of cfml processing here...

(at the end of the file)
<cfif IsDefined("xfa")>
        ...do exit fuseaction exiting logic here...
</cfif>

Now this sure does require that I put the exiting logic at the end of the
page, but I have occasionally gotten lazy and stuck it mid-way through a
file. Just wrap it in that isdefined() and you're good to go.

This system lets you reuse any and every act_file, in any combination;
allows the act_file to control the exiting; allows the index.cfm to control
the exiting; and doesn't pee on the carpets. Sounds perfect, eh?

NAT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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?sidebar=lists

Reply via email to