
394
Chapter 21 Building Custom CFXAPI Tags
This section provides an overview of these object types. For a complete example Java
CFX that uses
Request
,
Response
, and
Query
objects, see the “ZipBrowser Example”
on page 397.
Request object
The
Request
object is passed to the
processRequest
method of the
CustomTag
interface. It provides methods for retrieving attributes, including queries, passed to
the tag and for reading global tag settings.
Response object
The
Response
object is passed to the
processRequest
method of the
CustomTag
interface. It provides methods for writing output, generating queries, and setting
variables within the calling page.
Query object
The
Query
object provides an interface for working with ColdFusion queries. It
includes methods for retrieving name, row count, and column names and methods
for getting and setting data elements.
Method
Description
attributeExists
Checks whether the attribute was passed to this tag.
getAttribute
Retrieves the value of the passed attribute.
getIntAttribute
Retrieves the value of the passed attribute as an integer.
getAttributeList
Retrieves a list of all attributes passed to the tag.
getQuery
Retrieves the query that was passed to this tag, if any.
getSetting
Retrieves the value of a global custom tag setting.
debug
Checks whether the tag contains the
debug
attribute.
Method
Description
write
Outputs text into the calling page.
setVariable
Sets a variable in the calling page.
addQuery
Adds a query to the calling page.
writeDebug
Outputs text into the debug stream.
Method
Description
getName
Retrieves the name of the query.
getRowCount
Retrieves the number of rows in the query.
getColumns
Retrieves the names of the query columns.
getData
Retrieves a data element from the query.
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...