The cfobject tag can create a ColdFusion component (CFC) object.
<cfobject name = "variable name" component = "component name">
cfcollection, cfcomponent, cfexecute, cfindex, cfreport, cfsearch, cfwddx
Executing operations on a CFC object executes CFML code that implements the CFC's method in the CFC file. Using this tag to instantiate a component returns a ComponentProxy object that can delegate control to a CFC page.
<!--- separate instantiation and method invocation; permits multiple invocations --->
<cfobject name="quoteService" component="nasdaq.quote"> <cfinvoke component="#quoteService#" method="getLastTradePrice" symbol="macr" returnVariable="res"> <cfoutput>#res#</cfoutput><br> <cfinvoke component="#quoteService#" method="getLastTradePrice" symbol="mot" returnVariable="res"> <cfoutput>#res#</cfoutput>
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6
Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt26.htm