User Guide

Table Of Contents
Using ColdFusion components 217
Invoking CFC methods with the cfinvoke tag
Using components directly in CFScript and CFML
Invoking CFC methods using forms and URLs
Accessing CFCs from outside ColdFusion and basic HTML
Specifying the CFC location
Tags for using CFCs
The following table lists the tags that you use to instantiate or invoke a CFC. You use these tags
on the CFML page on which you instantiate or invoke the CFC.
CFC invocation techniques
ColdFusion provides many ways to instantiate CFCs and invoke CFC methods. The following
table lists the techniques, including the ColdFusion tags and functions that you use:
Tag Description
cfinvoke
Invokes a method of a CFC.
cfinvokeargument
Passes the name and value of a parameter to a component method.
cfobject
Creates a CFC instance.
CreateObject
Creates a CFC instance.
Invocation Description For more information
cfinvoke tag Invokes a component method. Can invoke
methods of a CFC instance or invoke the
methods transiently.
See “Invoking CFC methods with
the cfinvoke tag” on page 218.
cfset tag and
assignment
statements
Invoke methods and access properties of a
component instance.
See “Using components directly in
CFScript and CFML” on page 220.
URL
(HTTP GET)
Transiently invokes a component method by
specifying the component and method
names in the URL string.
See “Invoking component methods
using a URL” on page 222.
Form control
(HTTP POST)
Transiently invokes a component method
using the HTML
form and input tags and
their attributes.
See “Invoking component methods
using a form” on page 222.
Flash Remoting ActionScript can transiently invoke
component methods.
See Chapter 33, “Using the Flash
Remoting Service,” on page 807.
Web services The
cfinvoke tag and CFScript consume
web services in ColdFusion MX 7. External
applications can also consume CFC
methods as web services.
See Chapter 36, “Using Web
Services,” on page 885.