Is it safe to call cfmodule from within a CFC stored in the application scope? 
I think the example below is safe because the custom tag only manipulates the 
caller's var scope. Can anybody see any other problems?

<!--- MyComponent.cfc --->
<cfcomponent>
        <cffunction name="init" access="public" output="true" 
returntype="MyComponent">
                <cfreturn this/>
        </cffunction>
        
        <cffunction name="runCustomTag" returntype="date" output="true">
                <cfset var tagOutput = ""/>
                <cfmodule template="MyCustomTag.cfm" outputVariable="tagOutput" 
/>
                <cfreturn tagOutput/>
        </cffunction>
</cfcomponent>

<!--- MyCustomTag.cfm --->
<cfparam name="Attributes.outputVariable" type="string"/>
<cfset Caller[attributes.outputVariable] = now()/>
<cfexit method="exittag"/>


Janet


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271539
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to