| Contents > Developing ColdFusion MX Applications > Building and Using ColdFusion Components > Using ColdFusion components > Instantiating CFCs |
|
|
|
|
||
If you use a CFC multiple times in a ColdFusion request, or if you use a CFC with persistent properties, use the cfobject tag or CreateObject function to instantiate the CFC before you call its methods.
The following example uses the cfobject tag to create an instance of the tellTime CFC.
<cfobject component="tellTime" name="tellTimeComp">
The following example uses the cfobject tag to instantiate the same component in CFScript:
tellTimeComp = CreateObject("component", "tellTime");
|
|
||
| Contents > Developing ColdFusion MX Applications > Building and Using ColdFusion Components > Using ColdFusion components > Instantiating CFCs |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/buildi13.htm
Comments
No screen name said on Sep 24, 2003 at 1:11 PM : enderw88 said on Mar 25, 2004 at 6:58 AM :