Guys, in this case, ColdFusion DOES have a GOTO.  It's called CFEXIT, and
this exactly what it's for.

So in your CustomTag, if you want to drop out through the closing tag, you
just <CFEXIT>  The default value of the METHOD attribute is "ExitTag"!!

So at the front of your CustomTag, you check the security.  If the
permissions are not sufficient, you CFEXIT, and code execution resumes from
the CLOSING tag.

btw, I take no credit for this technique.  It was Stan, or one of his
alter-egos.

Leeb.


--------------------------
From: Nat Papovich [mailto:[EMAIL PROTECTED]]
....

About your idea, Ken - I tried to make that idea work, but couldn't figure
it out. There is no GOTO processing in CF (lousy no-good language anyway -
I'm converting to VB and windows script host). If there WAS a GOTO, we could
just GOTO cf_bodycontent's thistag.executionmode="end".

The best I could come up with was to cflocation to the index with
fa=secureCheckfailed, and let that fa handle it. Wait though, here's an
idea. Maybe cflocation
url=index.cfm?fa=bodycontentsecurecheck1234567890&failMessage=blah (some
never-to-be-duplicated fuseaction) and then let the cfdefaultcase handle it
(which everyone has, right?) by outputting the failMessage variable that you
passed on that cflocation from within secureCheck. Hmmmm....

....


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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