Gotcha...
Thx
Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293
http://www.childrensdayton.org
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 6/30/2003 11:17:48 AM >>>
Well you could use the pre-cfswitch option...
<cfif IsUserInRole....
<cfelseif IsUserInRole...
<cfelseif IsUserInRole....
<cfelse>
No mathing roles found.
</cfif>
Not quite as clean as a cfswitch...but some of the benifits and should
be a
bit faster then a bunch of complete <cfif></cfif> blocks. This code
block
will stop testing conditions once a match is found. To optimize it,
put
your conditions in order of most likely to least likely.
--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA
-----Original Message-----
From: Candace Cottrell [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 8:07 AM
To: CF-Talk
Subject: RE: Cfswitch question
Thanks Jim...
Sooo, I guess I have to do this by going through each of my roles and
doing cfifs?
Seems like I am "hardcoding" almost.
Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293
http://www.childrensdayton.org
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 6/30/2003 11:01:08 AM >>>
It's not illegal, but it won't work.
IsUserInRole() takes a role and returns a Boolean (true/false) - it
really
can't be used in a switch like that. (The "value" attribute looks at
the
RETURN of "expression" - it doesn't act as input to it.)
Jim Davis
> -----Original Message-----
> From: Candace Cottrell [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 30, 2003 10:55 AM
> To: CF-Talk
> Subject: Cfswitch question
>
> Is this illegal?
>
> <Cfswitch expression="IsUserInRole()">
> <CfCase value="Admin">
> <h2>Administrator Functions: </h2>
> </cfcase>
> <CfCase value="Facilities">
> <h2>Facilities Functions: </h2>
> </cfcase>
>
> </Cfswitch>
>
> Candace K. Cottrell, Web Developer
> The Children's Medical Center
> One Children's Plaza
> Dayton, OH 45404
> 937-641-4293
> http://www.childrensdayton.org
>
>
> [EMAIL PROTECTED]
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4