User Guide

344 Chapter 2: ColdFusion Tags
Attributes
Usage
You must position cfproperty tags at the beginning of a component, above executable code and
function definitions.
If a component is not used as a web service, The
cfproperty only provides metadata information
when the component is viewed using introspection; for example, by opening the CFC file directly
in the browser. It does not define variables or set values that you can then use in your component.
Attribute Req/Opt Default Description
name Required A string; a property name. Must be a static value.
type Optional any A string; identifies the property data type:
any
array
binary
boolean
date
guid: the argument must be a UUID or GUID of the form
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx where each x is a
character representing a hexadecimal number (0-9A-F).
numeric
query
string
struct
uuid: The argument must be a ColdFusion UUID of the form
xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx where each x is a
character representing a hexadecimal number (0-9A-F).
variableName: a string formatted according to ColdFusion
variable naming conventions.
a component name: if the type attribute value is not one of the
preceding items, ColdFusion treats it as the name of a
ColdFusion component. When The function executes, it
generates an error if the argument that is passed in is not a CFC
with the specified name.
required Optional no Whether the parameter is required:
yes
no
default Optional If no property value is set when the component is used for a web
service, specifies a default value.
If this attribute is present, the
required attribute must be set to
"no" or not specified.
displayname Optional A value to be displayed when using introspection to show
information about the CFC. The value appears in parentheses
following the property name.
hint Optional Text to be displayed when using introspection to show
information about the CFC. This attribute can be useful for
describing the purpose of the parameter.