Name
cfcomponent
Synopsis
<cfcomponent>
CFML...
[<cfproperty>]
...
[<cffunction>
...
</cffunction>]
...
</cfcomponent>
Acts as a container for a ColdFusion
Component (CFC). Any CFML code outside a
cfproperty
or cffunction
container is considered a constructor and is automatically executed
when the component is instantiated. Any variables set are
automatically available to all methods in the component.
Besides the named attributes listed below, you can pass any
additional desired attributes to the cfcomponent
tag as user-defined attributes. Although these attributes
don’t do anything, they are available as metadata
when the component is introspected using the GetMetaData(
)
function. You may use any attribute names you wish with
the exception of those reserved by cfcomponent
:
name
, displayname
,
hint
, output
,
path
, properties
, and
functions
.
Attributes
-
displayname="
display_name
"
Used to display a descriptive name for the component in ColdFusion MX’s Component Browser. Optional.
-
extends="
component_name
"
Name of a parent component from which the component should inherit methods and properties. Optional.
-
hint="
text
"
Used to display a hint describing what the component does in ColdFusion MX’s Component Browser. Optional.
-
output="Yes|No"
Indicates whether the component allows output within the “constructor” area (the area outside any
cffunction
tags). IfYes
, expressions surrounded with pound signs are automatically evaluated without the need forcfoutput
tags, and output is permitted. ...
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.