Simpler, but it wouldn't work for anything beyond a Hello World app.
I like to let every fuse do it's own exiting. dsp_files get to do it, why
shouldn't act_ files get to also? I always tend to think of XFas applying
directly and only to the file beneath them. When I do dsp_ type fuseactions,
I stick the cfset xfas just above the cfinclude for the dsp.
If we stick it at the end of the cfswitch, then every fuseaction would get
cflocationed. Remember, I'm not checking for the existence of a specific
XFA, just checking if any XFAs have been defined. The individual fuse still
gets to do it's only logic for handling where to go and what variables to
pass on the url. The index just decides if it is going to let the file go
anywhere.
Nat Papovich
Webthugs Consulting
ICQ 32676414
"If it was hard to write,"
says the Real Programmer,
"it should be hard to understand."
> -----Original Message-----
> From: Hal Helms [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 10, 2001 1:22 PM
> To: Fusebox
> Subject: RE: Surveying the community
>
>
> 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