User Guide

Table Of Contents
Creating ColdFusion components 215
Metadata attributes are not used by ColdFusion MX for processing; they also do not appear in
standard ColdFusion introspection displays; however, you can access and display them by using
the
GetMetaData function to get the metadata. Each attribute name is a key in the metadata
structure of the CFC element.
Metadata attributes are used for more than documentation. Your application can use the
GetMetadata function to get the metadata attributes and act based on the values. For example, a
mathCFC component might have the following cfcomponent tag:
<cfcomponent displayname="Math Functions" MetaType="Float">
In this case, a ColdFusion page with the following code sets the MetaTypeInfo variable to Float:
<cfobject component="mathCFC" name="MathFuncs">
<cfset MetaTypeInfo=GetMetadata(MathFuncs).MetaType>
Note: All metadata values are replaced by strings in the metadata structure returned from the
GetMetadata function. Because of this, you should not use expressions in custom metadata attributes.
The cfproperty tag
The cfproperty tag is used to create complex data types with WSDL descriptors and for
component property documentation, as follows:
It can create complex data types with WSDL descriptions for ColdFusion web services. For
more information, see “Using ColdFusion components to define data types for web services
on page 902.
It can provide documentation of component properties in the ColdFusion introspection
output. The introspection information includes the values of the standard
cfproperty tag
attributes.
Note: The cfproperty tag does not create a variable or assign it a value. It is used for information
purposes only. You use a cfset tag, or CFScript assignment statement, to create the property and
set its value.
Saving and naming ColdFusion components
The following table lists the locations in which you can save component files and how they can be
accessed from each location:
Note: ColdFusion MX mappings and custom tag roots can exist within the web root. If so, they are
accessible to remote requests, including URL, form, Flash Remoting, and web services invocation.
URL Form Flash
Remoting
Web
services
ColdFusion
page
Current directory N/A Yes N/A N/A Yes
Web root Yes Yes Yes Yes Yes
ColdFusion mappings No No No No Yes
Custom tag roots No No No No Yes