Lee B, et al -

Unfortunately, since the secureCheck tag can be called WITHOUT a closing tag
(to secure all processing of the page henceforth from the starting tag), a
CFEXIT from within secureCheck does not achieve the desired results. The
cflocation is still required in those instances. Obviously, the smartest way
to get around this is just to wrap the entire body of the fuseaction
(everything between the opening and closing <cfcase>) which actually would
do the correct cfexiting.

This method (wrapping fuseactions in the whole secureCheck tag), is how I'm
recommending this tag's use. However, if you need to redirect processing of
a page and don't have the luxury of using a closing tag (like if you want to
stick it in an app_locals (yes, I still use app_locals)), you can let the
cfdefaultcase pick it up, but be sure to avoid an endless loop if you stick
it in app_locals by wrapping the secureCheck call in a
<cfif not attributes.fa is "cfsecureCheck1234567890">.

Finally, this tag can be called using shorthand closing method like
<cf_secureCheck.../> and it will perform the processing of the page, but not
display anything. I can't figure out how this would be useful, but ya never
know...

Now the ability to CFEXIT from within a custom tag TO the closing tag of
another custom tag wrapping the cfexit call... whew, that would be nice.

So it's posted at
http://www.webthugs.com/consulting/index.cfm?fuseaction=gang.

> -----Original Message-----
> From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 10:57 PM
> To: Fusebox
> Subject: RE: Cf_BodyContent and other functionalities!!
>
>
> 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