User Guide

Chapter 18: Building Custom CFAPI Tags 317
Method Detail
attributeExists
public boolean attributeExists(String name)
Checks to see whether the attribute was passed to this tag.
The following example checks to see if the user passed an attribute named
DESTINATION to the tag and throws an exception if the attribute was not passed:
if ( ! request.attributeExists("DESTINATION") )
{
throw new Exception(
"Missing DESTINATION parameter",
"You must pass a DESTINATION parameter in "
"order for this tag to work correctly." ) ;
} ;
Parameters:
name — Name of the attribute to check (case insenstive)
Returns:
Returns true if the attribute is available otherwise returns false.
See Also:
getAttribute, getAttributeList
String getAttributeList()
Retrieves a list of all
attributes passed to the tag.
int getIntAttribute(String name)
Retrieves the value of the
passed attribute as an
integer.
int getIntAttribute(String name, int def)
Retrieves the value of the
passed attribute as an
integer (returns default if the
attribute does not exist or is
not a valid number).
Query getQuery()
Retrieves the query that was
passed to this tag.
String getSetting(String name)
Retrieves the value of a
global custom tag setting.
Method Summary