276
What Are CFX Tags?
CFX tags are custom tags written against the ColdFusion Application Programming
Interface. Generally, you create a CFX if you want to do something that's not possible
in CFML, or if you want to improve performance of a task in CFML that's repetitive.
Unlike CFML custom tags, CFXs are implemented as DLL files and can:
Handle any number of custom attributes.
Use and manipulate ColdFusion queries for custom formatting.
Generate ColdFusion queries for interfacing with non-ODBC based
information sources.
Dynamically generate HTML to be returned to the client.
Set variables within the ColdFusion application page from which they are
called.
Throw exceptions that result in standard ColdFusion error messages.
You can build CFXs using C++ or Java. Then, to be able to use the CFX, you have to
register it in the ColdFusion Administrator.
Before You Begin Developing CFX Tags in C++
Sample C++ CFXs
Before you begin development of a CFX tag in C++, you may want to study the two CFX
tags that are included to give you additional insight into working with the CFAPI. The
two example tags are:
CFFX_DIRECTORYLIST
CFX_NTUSERDB
On Windows NT, these tags are located in the
Solaris, look in /<
Setting Up Your C++ Development Environment
Before you can use your C++ compiler to build custom tags, you must enable the
compiler to locate the CFAPI header file,
the CFAPI Include directory (
paths. On UNIX, you will need
Makefile directory list example).
— Queries a directory for the list of files it contains.
(Windows NT only) — Allows addition and deletion of NT users.
installdirectory >/coldfusion/cfx/examples
cfx.h
\cfusion\cfx\include
-I < includepath >
Developing Web Applications with ColdFusion
/cfusion/cfx/examples
.
. On Windows NT, you do this by adding
) to your list of global include
on your compile line (see the
directory. On
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?