Using the GetMetaData function

The CFML GetMetaData function returns a structure that contains all the metadata of a CFC instance. This structure contains substantially more data about the CFC than the cfdump tag shows, and includes the following information:

To display metadata for a CFC:

  1. Create the tellAboutCfcs.cfm file in the same directory as the telltime.cfc file, with the following code:
    <!--- Create an instance of the component. --->
    <cfobject component="tellTime" name="tellTimeObj">
    <!--- Create a new structure. --->
    <cfset aboutcfc=structNew()>
    <!--- Populate the structure with the metadata for the
    			tellTimeObj instance of the tellTime CFC. --->
    <cfset aboutcfc=GetMetaData(tellTimeObj)>
    <cfdump var="aboutcfc">
    
  2. View the tellAboutCfcs.cfm file in a browser.

For information on how to specify CFC metadata, including how to use component tags and how to specify metadata-only attributes, see Documenting CFCs.


View comments in LiveDocs