276
Developing Web Applications with ColdFusion
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
— Queries a directory for the list of files it contains.
•
CFX_NTUSERDB
(Windows NT only) — Allows addition and deletion of NT users.
On Windows NT, these tags are located in the
/cfusion/cfx/examples
directory. On
Solaris, look in /<
installdirectory
>/coldfusion/cfx/examples
.
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,
cfx.h
. On Windows NT, you do this by adding
the CFAPI Include directory (
\cfusion\cfx\include
) to your list of global include
paths. On UNIX, you will need
-I <
includepath
>
on your compile line (see the
Makefile directory list example).
Содержание COLDFUSION 4.5-DEVELOPING WEB
Страница 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Страница 14: ...xiv Developing Web Applications with ColdFusion...
Страница 26: ...xxvi Developing Web Applications with ColdFusion...
Страница 34: ...8 Developing Web Applications with ColdFusion...
Страница 70: ...44 Developing Web Applications with ColdFusion...
Страница 84: ...58 Developing Web Applications with ColdFusion...
Страница 114: ...88 Developing Web Applications with ColdFusion...
Страница 148: ...122 Developing Web Applications with ColdFusion...
Страница 174: ...148 Developing Web Applications with ColdFusion...
Страница 208: ...182 Developing Web Applications with ColdFusion...
Страница 244: ...218 Developing Web Applications with ColdFusion...
Страница 274: ...248 Developing Web Applications with ColdFusion...
Страница 288: ...262 Developing Web Applications with ColdFusion...
Страница 300: ...274 Developing Web Applications with ColdFusion...
Страница 350: ...324 Developing Web Applications with ColdFusion...
Страница 362: ...336 Developing Web Applications with ColdFusion...