Tags
41
Other tags, such as
cfset
and
cfftp
, never have bodies; all the required information goes
between the beginning (<) character and the ending (>) character, as in the following example:
<cfset YourName="Bob">
Sometimes, although the tag can have a body, you do not need to put anything in it because the
attributes specify all the required information. You can omit the end tag and put a forward slash
character before the closing (>) character, as in the following example:
<cfexecute name="C:\winNT\System32\netstat.exe" arguments = "-e"
outputfile="C:\Temp\out.txt" timeout = "1" />
Note:
The
cfset
tag differs from other tags in that it has neither a body nor arguments. Instead, the
tag encloses an assignment statement that assigns a value to a variable. The
cfset
tag can also call a
function without assigning a value to a result variable.
Built-in tags
Over 80 built-in tags make up the heart of ColdFusion. These tags have many uses, including the
following:
•
Manipulating variables
•
Creating interactive forms
•
Accessing and manipulating databases
•
Displaying data
•
Controlling the flow of execution on the ColdFusion page
•
Handling errors
•
Processing ColdFusion pages
•
Managing the CFML application framework
•
Manipulating files and directories
•
Using external tools and objects, including Verity collections, COM, Java, and CORBA
objects, and executable programs
•
Using protocols, such as mail, http, ftp, and pop
Much of this document describes how to use these tags effectively.
CFML Reference
documents
each tag in detail.
Custom tags
ColdFusion lets you create custom tags. You can create two types of custom tags:
•
CFML custom tags that are ColdFusion pages
•
CFX tags that you write in a programing language such as Java or C++
Custom tags can encapsulate frequently used business logic or display code. These tags enable you
to place frequently used code in one place and call it from many places. Custom tags also let you
abstract complex logic into a single, simple interface. They provide an easy way to distribute your
code to others; you can even distribute encrypted versions of the tags to prevent access to the tag
logic.
Currently, over 1,000 custom tags are available on the Macromedia developer’s exchange
(www.coldfusion.com/Developer/Gallery/index.cfm). They perform tasks ranging from checking
if Cookies and JavaScript are enabled on the client's browser to moving items from one list box to
another. Many of these tags are free and include source code.
Содержание COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...