Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

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). If Yes, expressions surrounded with pound signs are automatically evaluated without the need for cfoutput tags, and output is permitted. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page