Adobe COLDFUSION 9 Manual page 193

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
For information on displaying the information, see
page 205.
The displayname and hint attributes
The cfcomponent, cffunction, cfargument, and cfproperty tags have
The
attribute lets you provide a more descriptive name for a component, attribute, method, or property.
displayname
When you use introspection, this attribute appears in parentheses next to the component or method name, or on the
parameter information line.
You use the
attribute for longer descriptions of the component, method, or argument. In the introspection
hint
display, this attribute appears on a separate line or on several lines of the component or method description, and at the
end of the argument description.
Metadata attributes
You can include arbitrary metadata information as attributes of the
tags. To create a metadata attribute, specify the metadata attribute name and its value. For example, in
cfproperty
the following
cfcomponent
parameter; instead, it indicates who wrote this CFC.
<cfcomponent name="makeForm" Author="Bean Lapin">
Metadata attributes are not used by ColdFusion for processing; they also do not appear in standard ColdFusion
introspection displays; however, you can access and display them by using the GetMetaData or
GetComponentMetaData 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
the metadata attributes for a component instance, or the GetComponentMetaData function to get the metadata for an
interface or component that you have not yet instantiated. You can then act based on the values. For example, a
component could have the following
mathCFC
<cfcomponent displayname="Math Functions" MetaType="Float">
In this case, a ColdFusion page with the following code sets the
<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
Because of this, do not use expressions in custom metadata attributes.
The cfproperty tag
The
tag is used to create complex data types with WSDL descriptors and for component property
cfproperty
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
• It can provide documentation of component properties in the ColdFusion introspection output. The introspection
information includes the values of the standard
Note: The
tag does not create a variable or assign it a value. It is used for information purposes only. You
cfproperty
use a
tag, or CFScript assignment statement, to create the property and set its value.
cfset
"Using introspection to get information about
tag, the
attribute is a metadata attribute. This attribute is not used as a function
Author
cfcomponent
cfproperty
Last updated 8/5/2010
and
displayname
hint
,
cfcomponent
cffunction
GetMetadata
tag:
variable to
MetaTypeInfo
services" on page 1109.
tag attributes.
components" on
attributes.
,
, and
cfargument
function to get
:
Float
function.
GetMetadata
188

Advertisement

Table of Contents
loading

Table of Contents