Skip to content

Instantly share code, notes, and snippets.

@Zoramite
Created December 15, 2010 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zoramite/742393 to your computer and use it in GitHub Desktop.
Save Zoramite/742393 to your computer and use it in GitHub Desktop.
Calling a function on a component dynamically.
<cfcomponent output="false">
<cffunction name="testing" access="public" returntype="string" output="false">
<cfargument name="value" type="string" required="true" />
<cfreturn '<strong>' & arguments.value & '</strong>' />
</cffunction>
</cfcomponent>
<cfset testObject = createObject('component', 'dynamicCalls') />
<cfoutput>#testObject['testing']('value')#</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment