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

GetMetaData

Synopsis

                  
                  GetMetaData(object)
GetMetaData(THIS)

Returns metadata such as properties, methods, and parameters for the specified ColdFusion Component (CFC) when used within a CFML page. When used within a CFC, pass GetMetaData( ) the THIS scope, and it will return all of the metadata for the component. Metadata is returned as a structure containing various key/value pairs depending on the contents of the CFC. Values in the metadata structure may contain additional nested structure. The following outlines the minimum keys available for the various pieces of a CFC:

Component metadata Name

The name of the component

Path

Absolute path to the component

Extends

Structure containing ancestor component metadata

Functions

Array of structures containing metadata about each function (method) in the component

Function (method) metadata Name

Name of the function

Parameters

Array of structures containing metadata about each argument

Argument metadata Name

Name of the argument

Property metadata Name

Name of the property

Additional keys may be available depending on how the CFC is coded. For example, Function metadata may also contain keys for Hint, ReturnType, Output, and Access. The best way to understand what metadata is available for a particular object is to retrieve the metadata for it and output the results to your browser with cfdump. Here’s an example that does just that for the CFC Explorer component that ships with ColdFusion MX:

<cfscript> myObj = createObject("component", ...
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