Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 869

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
bind="cfc:mycfc.myfunction(arg1={myform:myfield1},arg2={myform:myfield2})"
Support for CFCs outside webroot
Note: To use this feature, you must install ColdFusion 9 Update 1.
Components outside the webroot can be accessed in bind expressions. This implies that tags such as
Ajax components such as grid, map, or progress bar can be used in more effective ways.
Note: In the previous releases, the CFCs had to be web-accessible for Ajax applications to function.
In addition to accessing CFCs using relative or absolute path, you can also use any of the following methods to access CFCs:
• logical mappings (defined in the ColdFusion Administrator)
• per-app mappings (defined in Application.cfc)
• imports (using
cfimport
Usage
The following code shows the usage of this enhancement using per-map mappings:
Application.cfc
THIS.mappings["/mycfc"] = "C:\www\shared\components";
Test.cfm
<cfajaxproxy cfc="mycfc.utils" jsclassname='jsobjname' />
Example
In this example, a per-app mapping named
For the sample code to work, create a folder named components in your system root (in this example, c:\) and copy
the Employee.cfc to that folder.
Application.cfc
<cfcomponent>
<cfset this.name = "cfcoutsidewebroot">
<cfset this.sessionmanagement = true>
<Cfset mappingname = "/mycfcs">
<Cfset mappingpath = "c:\components\">
<cfset this.mappings[mappingname] = mappingpath>
</cfcomponent>
Employee.cfc
/import)
has been created in Application.cfc pointing to "c:\components".
mycfcs
Last updated 1/20/2012
864
or
cfajaxproxy

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents