<cffunction>

Defines table column header, width, alignment, and text. Used only inside a cftable.

Usage

<cffunction
    [access=string]
    [hint=string]
    [returnformat=string]
    [returntype=string]
    [localmode=string]
    [output=boolean]
    [securejson=boolean]
    [displayname=string]
    [bufferoutput=boolean]
    name=string
    [abstract=boolean]
    [verifyclient=boolean]
    [roles=string]
    [description=string]
    [cachedwithin=object]
><!--- body ---></cffunction>

This tag must have a body.

This tag is also supported within cfscript

Attributes

Attribute Description
access
(string, optional)

This attribute is used only for a component. The client security context from which the method can be invoked

hint
(string, optional)

Hint of the Function

returnformat
(string, optional)

The format in which to return values to a remote caller. Possible values are [wddx], json, plain (text), serialize (cfml, cfm), xml, and java.

returntype
(string, optional)

String; a type name; data type of the function return value

localmode
(string, optional)

Defines how the local scope of this function is invoked when a variable with no scope definition is used. Accepted values include:

  • classic (default): The local scope is only invoked when the key already exists in it.
  • modern: The local scope is always invoked.
output
(boolean, optional)

This attribute is used only for a component.

yes: the function is processed as if it were within a cfoutput tag no: the function is processed as if it were within a cfsilent tag

securejson
(boolean, optional)

A Boolean value that specifies whether to add a security prefix in front of any value that the function returns in JSON-format in response to a remote call.

displayname
(string, optional)

Display Name of the Function

bufferoutput
(boolean, optional)

this attribute is only used when output of the function is set to false. if this attribute is set to true (default) the output written to the body of the function is buffered and in case of a exception also outputted. if set to false the content to body is ignored and not disabled when a failure in the body of the tag occur.

name
(string, required)

A string; a component method that is used within the cfcomponent tag.

abstract
(boolean, optional)

is the function abstract or not, abstract functions are only allowed inside interface or component tags

verifyclient
(boolean, optional)

A Boolean value that specifies whether to require remote function calls to include an encrypted security token. For use with AJAX applications only.

roles
(string, optional)

This attribute is used only for a component. If this attribute is omitted, all roles can invoke the method.

description
(string, optional)

Supplies a short text description of the function.

cachedwithin
(object, optional)

possible values are: String "request": If original content was created within the current request, cached content data isused. a timespan (created with function CreateTimeSpan): If original content date falls within the time span, cached content data isused.

To use cached data, the function must be called with the exact same arguments.

Examples

There are currently no examples for this tag.