Inside ColdFusion MX
Authors: Cummings J. Ross N. Sen R.
Published year: 2005
Pages: 206-209/579
Buy this book on amazon.com >>
"-->

CFCOMPONENT

<cfcomponent> 
        extends ... 
        output = "yes" or "no" 
   <cffunction ...> 
        ... 
   </cffunction> 

</cfcomponent>

Description

This is the tag used to create ColdFusion components (CFC) and is saved as a CFC file. It may contain additional functionality that within CFFUNCTION tags that define methods . All code that is not contained within CFFUNCTION tags is executed when the CFC is first called. A component can be invoked in several ways including from a CFINVOKE tag, from a URL, from within CFScript, through a web service, or from Flash code.

Attributes

extends (Optional)

Name of parent component from which to inherit methods and properties. If not used, the component inherits the methods and properties of ColdFusion.

output (Optional)

Yes : Suppresses component method output.

No : Permits component method output.

"-->

CFCONTENT

<cfcontent 
        type = "file_type" 
        deleteFile = "Yes" or "No" 
        file = "filename" 
        reset = "Yes" or "No">

Description

Sets the file or Multipurpose Internet Mail Extension (MIME) content type returned by the current page. It can also specify the name of a file to return with the page. Note that this tag must be enabled in the ColdFusion Administrator.

Attributes

type (Required)

File or MIME content type returned by current page.

deleteFile (Optional)

Default: No . Applies only if you specify a file with the file attribute.

Yes : Deletes a file after the download operation.

file (Optional)

Name of the file to get. When using ColdFusion in a distributed configuration, the file attribute must refer to a path on the system on which the web server runs.

reset (Optional)

Default: Yes . The reset and file attributes are mutually exclusive. If you specify a file, this attribute has no effect.

  • Yes . Discards output that precedes call to CFCONTENT .

  • No . Preserves output that precedes call to CFCONTENT .

encoding (Optional)

Default: ISO-8859-1 . The character encoding of generated output is text/html or any valid character encoding.

"-->

CFCOOKIE

<cfcookie 
        name = "cookie_name" 
        value = "text" 
        expires = "period" 
        secure = "Yes" or "No" 
        path = "url" 
        domain = ".domain">

Description

Defines web browser cookie variables , including expiration and security options.

Attributes

name (Required)

Name of cookie.

value (Optional)

Value assigned to cookie.

expires (Optional)

Handles the expiration of the cookie. Can be a date (for example, 12/20/02) or a number of days (for example, 10 or 100).

  • now . Deletes cookie from client cookie.txt file.

  • never . Never deletes cookie from client; writes cookie data to cookie.txt file.

secure (Optional)

The cookie will not be sent if the browser does not support Secure Sockets Layer (SSL). If Yes , variable must be transmitted securely.

path (Optional)

URL to which the cookie applies, or use multiple CFCOOKIE tags to have multiple URLS.

domain (Required)

This attribute is required in conjunction with the path attribute. The domain must start with a period and can be subdomains if desired.

"-->

CFDEFAULTCASE

<cfdefaultcase> 
        ... 
</cfdefaultcase>

Description

Used with the CFSWITCH and CFCASE tags.

Inside ColdFusion MX
Authors: Cummings J. Ross N. Sen R.
Published year: 2005
Pages: 206-209/579
Buy this book on amazon.com >>