MACROMEDIA COLFUSION MX 7-CFML Reference page 315

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

cfobject: component object
Description
Creates an instance of a ColdFusion component (CFC) object.
Syntax
<cfobject
name = "variable name"
component = "component name">
See also
,
cfcollection
ColdFusion components" in Chapter 10, "Building and Using ColdFusion Components," in
ColdFusion MX Developer's Guide
Attributes
Attribute
Req/Opt Default Description
name
Required
component Required
Usage
When the
cfobject
code in the CFC; that is, it runs code that is not in the method definitions.
On UNIX systems, ColdFusion searches first for a file with a name that matches the specified
component name, but is all lowercase. If it does not find the file, it looks for a filename that
matches the component name exactly, with the identical character casing.
Example
<!--- 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>
,
cfcomponent
cfexecute
String; name for the instantiated component. The name must not
have a period as the first or last character.
Name of component to instantiate.
tag creates an instance of the CFC, ColdFusion executes any constructor
,
,
,
cfindex
cfreport
,
; "Using
cfsearch
cfwddx
cfobject: component object
315

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents