– Common Function Library Project


Last updated May 18, 2012


Robby Lansaw

Version: 3 | Requires: CF6 | Library: DataManipulationLib

Pass in the result from getMetaData() and returns all properties within the cfc and those it extends. It is recursive. (I didn't find any true time difference and this seemed cleaner). This does not include the base 'component' tag in it's search. I couldn't see anyone putting properties there anyways. A special value will be added to each propery, foundIn, that represents which CFC a property was found in. This is useful in case both a child and parent CFC share the same property.

Return Values:
Returns an array of structs.


<cfset whatever = createobject('component', '')>
<cfset dummyArray = getComponentProps( getMetaData( whatever ))>
<cfdump var="#dummyArray#" />


Name Description Required
object The metadata from a component. Yes

Full UDF Source:

 * Returns an array of all properties in cfc's metadata, inherited or not.
 * v2 was submitted by salvatore fusto
 * v3 ditto
 * @param object      The metadata from a component. (Required)
 * @return Returns an array of structs. 
 * @author Robby Lansaw ( 
 * @version 3, May 18, 2012 
function getComponentProps(object) {
       var propArray = arrayNew(1);
       if (structKeyExists(object,'properties')) {
               propArray =;
       if (structKeyExists(object,'extends')) {
               propArray.addAll(getComponentProps(object.extends ));
       return propArray;


Latest Additions

Raymond Camden added
November 04, 2017

Leigh added
May 11, 2016

Raymond Camden added
May 10, 2016

Kevin Cotton added
May 05, 2016

Raymond Camden added
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson