Tags · Functions · Objects
Lucee Tag Reference
Choose a tag:

Tag <CFAJAXPROXY>

Creates a JavaScript proxy for a component, for use in an AJAX client. Alternatively, creates a proxy for a single CFC method, JavaScript function, or URL that is bound to one or more control attribute values.

Body

This tag may have a body.

Example

	<cfAjaxProxy
		[bind="string"]
		[cfc="string"]
		[extends="boolean"]
		[jsclassname="string"]
		[methods="string"]
		[onerror="string"]
		[onsuccess="string"]>

	[</cfAjaxProxy>]
	

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
bind string No A bind expression that specifies a CFC method, JavaScript function, or URL to call. Cannot be used with the cfc attribute. 
cfc string No the CFC for which to create a proxy. You must specify a dot-delimited path to the CFC. The path can be absolute or relative to location of the CFML page. For example, if the myCFC CFC is in the cfcs subdirectory of the Luceex page, specify cfcs.myCFC. On UNIX based systems, the tag searches first for a file whos name or path corresponds to the specified name or path, but is in all lower case. If it does not find it, Luceex then searches for a file name or path that coresponds to the attribute value exactly, with identical character casing. 
extends boolean No If true force ajaxproxy to look for remote methods in the cfc extensions chain. Any remote method found will be added to the proxy object. This atrribute cannot be used with a bind attribute. 
jsclassname string No The name to use for the JavaScript proxy class. 
methods string No Comma delimited list of methods name. If exists only the method ( if remote ) specified will be exposed in the proxy object. 
onerror string No The name of a JavaScript function to invoke when a bind, specified by the bind attribute fails. The function must take two arguments: an error code and an error message. 
onsuccess string No The name of a JavaScript function to invoke when a bind, specified by the bind attribute succeeds. The function must take one argument, the bind function return value. If the bind function is a CFC function, the return value is automatically converted to a JavaScript variable before being passed to the onSuccess function.