tab). I opend CFCexplorer (which is not encrypted).
Well its using Java calls and am not really sure how it handles a CFC when
it resolves it.
The function
<cffunction name="getcfcinhtml" access="remote"
hint="Generates html descriptor of a component with the specified name or
URI path as the http response.">
<cfargument name="name" type="string" required="yes" />
<cfargument name="path" type="string" required="no" />
<cftry>
<cfscript>
if ( IsDefined('arguments.path') and arguments.path neq '' ) {
proxy = CreateObject( "java", "coldfusion.runtime.TemplateProxyFactory"
) ;
comp = proxy.ResolvePath( arguments.path, getPageContext() ) ;
} else {
comp = CreateObject( "component", name ) ;
}
utils = CreateObject( "component", "utils" ) ;
WriteOutput( utils.cfcToHTML(comp) ) ;
</cfscript>
<cfcatch type="coldfusion.runtime.CfJspPage$NoSuchTemplateException">
<cfoutput><h4>Component not found</h4>
The component definition file for component '#name#' cannot be found on
this server.</cfoutput>
</cfcatch>
</cftry>
</cffunction>
is used to display in browser. Looking at the call for utils
utils = CreateObject( "component", "utils" ) ;
WriteOutput( utils.cfcToHTML(comp) ) ;
Utils.cfc seems to do a cfinclude of CFC.
So I am thinking that is does not use the application.cfm associated with
the CFC but uses its own internal application.cfm.
Thus defining Constructors calling REQUEST.variables will not work unless
they [REQUEST.variales] are also set somehow in the CFC.
So as the example:
This fails
<cfcomponent displayname="EmailAudit" hint="Audit CFMAIL calls and log
results to Database">
<!--- Set Some Defaults --->
<cfset THIS.strDBType= "Oracle80" >
<cfset THIS.strRemoteUser= REQUEST.strRemoteUser >
<cfset THIS.strAppCode= REQUEST.strAppCode >
<cfset THIS.strServIceCode= REQUEST.strServIceCode >
<cfset THIS.strAuditAction= REQUEST.strAuditAction >
<cfset THIS.strParentService= REQUEST.strParentService >
This succeeds
<cfcomponent displayname="EmailAudit" hint="Audit CFMAIL calls and log
results to Database">
<cfif NOT isDefined("reservedVars")> <!--- Call Reserved Vars in
case forgotten --->
<cfinvoke
component="customTags.setReservedVariables"
method="setReservedVariables"
returnvariable="reservedVars">
</cfinvoke>
</cfif>
<!--- Set Some Defaults --->
<cfset THIS.strDBType= "Oracle80" >
<cfset THIS.strRemoteUser= REQUEST.strRemoteUser >
<cfset THIS.strAppCode= REQUEST.strAppCode >
<cfset THIS.strServIceCode= REQUEST.strServIceCode >
<cfset THIS.strAuditAction= REQUEST.strAuditAction >
<cfset THIS.strParentService= REQUEST.strParentService >
So is my understanding correct. Hopefully someone can help me.
Thanks
Kevin
-Kevin Marino
----------------------
Webmaster - HealthObjects
[EMAIL PROTECTED]
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

