Title: cfc scope issues

I am new to cfc's and was working on trying to convert some of my custom tags to cfc's. The one problem I come across is trying to use the caller scope.
In my custom Tag which is below I did this by:


<cfoutput query="coreLV">
        <cfset "caller.C_#listchangedelims( listchangedelims(listchangedelims(coreLV.legalValue,'_','-'),'_',' '),'_','/')#" = coreLV.lKey>
</cfoutput>

basically this just loops through a query and set up a bunch of constantsto be used on any cfm page.
Now i would like to do the same in a cfc but cant get this to work. This is what i have come up with so far..... Please Help

<CFFUNCTION NAME="createCoreConstants" access="remote" returntype="void">
<CFARGUMENT NAME="tablename" type="string" required="yes">
        <cfquery name="coreLV" datasource="#request.app.DSN#" blockfactor="10" cachedwithin="#request.app.queryCache30#">
                SELECT dbo.#ARGUMENTS.tableName#.legalValue, dbo.#ARGUMENTS.tableName#.lKey
                FROM dbo.#ARGUMENTS.tableName#
                where dbo.#ARGUMENTS.tableName#.isActive=1
        </cfquery>
        <cfoutput query="coreLV">
                <cfset "
CALLER.C_#listchangedelims( listchangedelims(listchangedelims(coreLV.legalValue,'_','-'),'_',' '),'_','/')#" = coreLV.lKey>
        </cfoutput>
</CFFUNCTION>

Basically in the end I would like to execute a cfc that will loop through a table and create constants for
each record in the table that are available to be accessed on any page

Thanks for you Help in advance
Ryan Hamoud

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org 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/cfcdev@cfczone.org

Reply via email to