22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta<br />

Tags for using CFCs<br />

The following table lists the tags that you use to instantiate or invoke a CFC. You use these<br />

tags on the CFML page on which you instantiate or invoke the CFC.<br />

Tag Description<br />

cfinvoke Invokes a method of a CFC.<br />

cfinvokeargument<br />

CFC invocation techniques<br />

<strong>ColdFusion</strong> provides many ways to instantiate CFCs and invoke CFC methods. The<br />

following table lists the techniques, including the <strong>ColdFusion</strong> tags and functions that you use:<br />

252 Building and Using <strong>ColdFusion</strong> Components<br />

Passes the name and value of a parameter to a component method.<br />

cfobject Creates a CFC instance.<br />

CreateObject Creates a CFC instance.<br />

Invocation Description For more information<br />

cfinvoke tag Invokes a component method.<br />

Can invoke methods of a CFC<br />

instance or invoke the methods<br />

transiently.<br />

cfset tag and<br />

assignment<br />

statements<br />

URL<br />

(HTTP GET)<br />

Form control<br />

(HTTP POST)<br />

Invoke methods and access<br />

properties of a component<br />

instance.<br />

Transiently invokes a<br />

component method by<br />

specifying the component and<br />

method names in the URL<br />

string.<br />

Transiently invokes a<br />

component method using the<br />

HTML form and input tags and<br />

their attributes.<br />

Flash Remoting ActionScript can transiently<br />

invoke component methods.<br />

Web services The cfinvoke tag and CFScript<br />

consume web services in<br />

<strong>ColdFusion</strong>. External<br />

applications can also consume<br />

CFC methods as web services.<br />

See “Invoking CFC methods with<br />

the cfinvoke tag” on page 253.<br />

See “Using components directly in<br />

CFScript and CFML” on page 256.<br />

See “Invoking component methods<br />

using a URL” on page 257.<br />

See “Invoking component methods<br />

using a form” on page 258.<br />

See Chapter 35, “Using the Flash<br />

Remoting Service.”<br />

See Chapter 47, “Using Web<br />

Services.”

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!