Request Interface; Methods; Attributeexists - MACROMEDIA COLDFUSION MX 61-CFML Reference

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

Advertisement

Request interface

public abstract interface Request
Interface to a request made to a CustomTag. The interface includes methods for retrieving
attributes passed to the tag (including queries) and reading global tag settings.

Methods

Returns
Syntax
boolean
attributeExists(String name)
boolean
debug()
String
getAttribute(String name)
String[]
getAttributeList()
int
getIntAttribute(String name)
int
getIntAttribute(String name,
int def)
Query
getQuery()

attributeExists

Description
Checks whether the attribute was passed to this tag.
Returns True if the attribute is available; otherwise returns False.
Category
Request interface
Syntax
public boolean attributeExists(String name)
See also
,
getAttribute
Parameters
Parameter
name
Example
The following example checks whether the user passed an attribute named DESTINATION to
the tag; if not, it throws an exception:
if ( ! request.attributeExists("DESTINATION") )
{
throw new Exception(
getAttributeList
Description
Name of the attribute to check (case-insensitive)
Description
Checks whether the attribute was passed to this
tag.
Checks whether the tag contains the debug
attribute.
Retrieves the value of the passed attribute.
Retrieves a list of attributes passed to the tag.
Retrieves the value of the passed attribute as an
integer.
Retrieves the value of the passed attribute as an
integer (returns default if the attribute does not
exist or is not a valid number).
Retrieves the query that was passed to this tag.
Request interface
777

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents