Just be careful. When mycfc calls url.function, it will call it as an
"insider", so you would be able to call methods even if access=private.
If you do this, I'd suggest using metadata to check the function access,
or perhaps only allowing people to call functions that begin with api,
ie

mycfc.execute("apiYourMamaWearsCombatBoots");

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: jon hall [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 14, 2003 3:38 PM
> To: CF-Talk
> Subject: Re: Dynamic CFC function call
> 
> 
> Why not have the function logic in the cfc as well?
> 
> mycfc.execute(url.function)
> 
> where execute() looks at the value pass, executes the 
> necessary method and returns back the result.
> 
> Maybe it's just me, but mycfc.#url.function#(); would seem to 
> be the antithesis of self-documenting...
> 
> -- 
>  jon
>  mailto:[EMAIL PROTECTED]
> 
> Monday, July 14, 2003, 5:32:53 PM, you wrote:
> CV> I'm trying to pass a function name via a URL and then call that 
> CV> function. I want to do something like this (Assuming 
> mycfc has been 
> CV> created already):
> 
> CV> <cfscript>
> CV> mycfc.#url.function#();
> CV> </cfscript>
> 
> CV> Any idea how I can do this? I am getting an error because of the 
> CV> #'s. Anyone?
> 
> CV> Cedric
> CV> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to