Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 866

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Using bind expressions
To specify a
expression, use one of the following formats:
bind
• cfc:componentPath.functionName(parameters)
Note: In ColdFusion 9, the component path cannot use a mapping. The
delimited path from the web root or the directory that contains the current page.
• javascript:functionName(parameters)
• url:URL?parameters
• URL?parameters
• A string containing one or more instances of {bind parameter}, such as {firstname}.{lastname}@{domain}
In formats 1-4 the parameters normally include one or more bind parameters. The following table lists the tag
attributes that support bind expressions and the formats each use:
Attribute
Tags
autosuggest
cfinput type="text"
cfdiv, cfinput, cftextarea
bind
bind
cfajaxproxy, cfgrid, cfselect, cfsprydataset, cftreeitem
cfgrid
onChange
source
cflayoutarea, cfpod, cfwindow
The following examples show some of these uses:
bind="cfc:myapp.bookorder.getChoices({book})"
source="/myApp/innerSource/cityWindow.cfm?cityname={inputForm:city}
In these examples,
and {
{book}
and city controls, and the city control is in the inputForm form.
If a bind attribute specifies a page that defines JavaScript functions, the function definitions on that page must have
the following format:
functionName = function(arguments) {function body}
Function definitions that use the following format may not work:
function functionName (arguments) {function body}
However, Adobe recommends that you include all custom JavaScript in external JavaScript files and import them on
the application's main page, and not write them inline in code that you get using the source attribute. Imported pages
do not have this function definition format restriction.
Specifying bind parameters
A bind parameter specifies a form control value or other attribute, as in the following example:
bind="cfc:myapplication.bookSearch.getStores({form1:bookTitle})"
In this example, the bind parameter is form1:bookTitle and specifies the
form.
form1
Bind parameters have either of the following formats:
specify bind parameters that dynamically get data from the book
inputForm:city}
Last updated 1/20/2012
value must be a dot-
componentPath
Supported formats
1, 2, 3
1, 2, 3, 5
1, 2, 3
1, 2, 3
4
attribute of the bookTitle field of the
value
861

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents