cffunction

Overview ColdFusion Open BlueDragon Lucee

Defines a function that you can call in CFML. Required to defined CFML component methods.

Attributes

Name Required Type Default Description
3
abstract No is the function abstract or not, abstract functions are only allowed inside interface a component tags
access No String public The client security context from which the method can be invoked: private: available only to the component that declares the method and any components that extend the component in which it is defined package: available only to the component that declares the method, components that extend the component, or any other components in the package public: available to a locally executing page or component method remote: available to a locally or remotely executing page or component method, or a remote client through a URL, Flash, or a web service. To publish the function as a web service, this option is required.
4
bufferoutput No 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.
4
cachedwithin No 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.
10
consumes No String Specifies the media types that the CFFunction can accept. It can also be a comma separated string with multiple media types
description No String Supplies a short text description of the function.
displayname No String Meaningful only for CFC method parameters. A value to be displayed in parentheses following the function name when using introspection to show information about the CFC
hint No String Meaningful only for CFC method parameters. Text to be displayed when using introspection to show information about the CFC. The hint attribute value follows the syntax line in the function description
10
httpMethod No String Enables the cffunction to handle HTTP requests of the given HTTP method
jsoncase No How to treat the case of the keys of outgoing JSON. Values are: lower, upper or maintain. You can change the default encoding using the bluedragon.xml flag: server.system.jsoncase
jsondate No How dates should be encoded in the outgoing JSON. Values are: LONG, HTTP, JSON, CFML. You can change the default encoding using the bluedragon.xml flag: server.system.jsondate
4
localmode No 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.
name Yes String A string; a component method that is used within the cfcomponent tag.
output No Boolean Specifies under which conditions the function can generate HTML output.
10
produces No String Specifies the media types that the CFFunction can produce. It can also be a comma separated string with multiple media types
region No Enable per-function caching by enabling the cache. Any valid region can be used ('function' region exists for function calls). If enabled the cache key is calculated from the function name plus a hash of all the parameters passed in (only simple types are used in the form calculation)
10
restPath No String URI path. CFC method will serve request for this path.
8
3
returnformat No String The format in which to return values to a remote caller.
returntype No String Any String; a type name; data type of the function return value Required for a web service; Optional, otherwise.
roles No String A comma-delimited list of CFML security roles that can invoke the method. Only users who are logged in with the specified roles can execute the function. If this attribute is omitted, all users can invoke the method
8
3
securejson No Boolean 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.
throws No Exceptions throwd by the function
8
3
verifyclient No Boolean false A Boolean value that specifies whether to require remote function calls to include an encrypted security token. For use with ColdFusion AJAX applications only.