Response Interface; Methods; Addquery - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Response interface

public abstract interface Response
Interface to response generated from a custom tag. This interface includes methods for writing
output, generating queries, and setting variables in the calling page.

Methods

Returns
Syntax
Query
addQuery(String name, String[] columns)
void
setVariable(String name, String value)
void
write(String output)
void
writeDebug(String output)

addQuery

Description
Adds a query to the calling template. The query can be accessed by CFML tags in the template.
After calling
addQuery,
the Query member functions
Returns the Query that was added to the template.
Category
Response interface
Syntax
public Query addQuery(String name, String[] columns)
Throws
IllegalArgumentException
See also
,
addRow
setData
Parameters
Parameter
name
columns
Example
The following example adds a query named People to the calling template. The query has two
columns (FirstName and LastName) and two rows:
// Create string array with column names (also track columns indexes)
String[] columns = { "FirstName", "LastName" } ;
int iFirstName = 1, iLastName = 2 ;
// Create a query which contains these columns
Query query = response.addQuery( "People", columns ) ;
782
Chapter 5: ColdFusion Java CFX Reference
the query is empty (it has 0 rows). To populate the query with data, call
and
addRow
If the name parameter is not a valid CFML variable name.
Description
The name of the query to add to the template
The column names to use in the query
Description
Adds a query to the calling template.
Sets a variable in the calling template.
Outputs text back to the user.
Writes text output into the debug stream.
.
setData

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents