Skip to content

Instantly share code, notes, and snippets.

@ryanhinton
Created August 17, 2016 06:10
Show Gist options
  • Select an option

  • Save ryanhinton/03fa1dbab38ea61835ede54cc7b15da0 to your computer and use it in GitHub Desktop.

Select an option

Save ryanhinton/03fa1dbab38ea61835ede54cc7b15da0 to your computer and use it in GitHub Desktop.

Revisions

  1. ryanhinton created this gist Aug 17, 2016.
    9 changes: 9 additions & 0 deletions initializeDefaultPropertyValues.cfc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    component accessors=true {

    private function initializeDefaultPropertyValues() {
    for(local.property in getComponentMetaData('properties').properties) {
    variables[local.property.name] = listContains('array,struct', local.property.type) ? deserializeJSON(local.property.default) : local.property.default;
    }
    }

    }