Contents > CFML Reference > ColdFusion Java CFX Reference > Request interface > attributeExists PreviousNext

attributeExists

Checks whether the attribute was passed to this tag.

Returns True if the attribute is available; otherwise returns False.

Request interface

public boolean attributeExists(String name)

getAttribute, getAttributeList

Parameter

Description

name

Name of the attribute to check (case-insensitive)

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( 
   "Missing DESTINATION parameter",
   "You must pass a DESTINATION parameter in "
   "order for this tag to work correctly." ) ;
} ;

Contents > CFML Reference > ColdFusion Java CFX Reference > Request interface > attributeExists PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.