• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

CFC Syntax

<cfcomponent>

<cfcomponent> is the first and last tag in any component. To define a component, you simply put any number of methods (functions) into a file with the extension .cfc, and make sure that <cfcomponent> encloses the entire file. There are no required attributes for <cfcomponent>, but generally you'll want to use its optional attributes, displayname and hint, to produce self-documentation via introspection.

TIP

<cfcomponent> should be the first and last thing in any component file. Any CFML outside of the <cfcomponent> tags will cause the component to produce an error. Anything else, HTML or text, will be ignored.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint