- cfinclude the template that contains the udf from inside the cfc (between the cfcomponent tags and outside of any cffunction tags).
- Dynamically copy the udf to the cfc instance. So if you have a cfc instance "oPerson" and a udf "udfFormatName()" included in your template you can do <cfset oPerson.formatName = udfFormatName >. This will only apply the method to that particular instance of the cfc and not all instances like method 1 will.
On 3/23/06,
dickbob <[EMAIL PROTECTED]> wrote:
How can I use a UDF inside a CFC?
I've cfinclude'd the script before invoking the cfc method but it says it's
undefined.
dickbob
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
