Adobe COLDFUSION 9 Manual page 812

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
ColdFusion Ajax user interface features are based on the
Also, the
rich text editor is based on the
cftextarea
ColdFusion tags and functions (including JavaScript functions) to create and manage the interface. However,
advanced developers can modify the library code, particularly the CSS styles, to customize the controls in more
complex ways.
Controlling Ajax user interface layout
The following layout tags let you dynamically control the display:
• cfdiv
• cflayout
• cfpod
• cfwindow
For information about how you can use these tags to submit form contents asynchronously, see
for form
submission" on page 820.
Using the cfdiv tag
The cfdiv tag is a general-purpose container that lets you use a bind expression to specify its contents. It therefore lets
you dynamically refresh any arbitrary region on the page based on bind events. By default, the tag creates an HTML
region, but it can create any HTML tag with body contents. Unlike other ColdFusion Ajax container tags, you can
div
use any type of bind expression to populate contents: CFC or JavaScript function, URL, or a string with bind
parameters. As a result, the
cfdiv
The
tag is also useful if you want a form to submit asynchronously. That is, whether or not you use a bind
cfdiv
expression to populate the tag. If you submit a form that is inside a
expression), the form submits asynchronously. The response from the form submission populates the
(The
,
cflayoutarea
cfwindow
form that includes a list of artists, and lets you add artists. If the form is in a
the entire page is not refreshed, only the region inside the
asynchronous forms, see
"Using Ajax containers for form
One use case for a
tag is an application where a
cfdiv
in the grid are displayed inside a
users click through different employees on the grid, they get the employee details in the
The following simple example shows how you can use the
to display the contents of a text input field in an HTML div region. When a user enters text in the input box and tabs
out of it, or clicks another region of the application, the div region displays the entered text.
The cfdiv tag.cfm file, the main application file, has the following contents.
Yahoo User Interface Library
FCKeditor text
tag provides substantial flexibility in dynamically populating the page contents.
, and
tags have the same behavior.) For example, you could have a page with a
cfpod
cfdiv
submission" on page 820.
cfgrid
tag with a bind expression that specifies the
cfdiv
cfdiv
Last updated 8/5/2010
and the
editor. In most situations, you require only
tag (including in HTML returned by a bind
cfdiv
tag, when the user submits the form,
cfdiv
tag. For an example of using container controls for
tag displays an employee list. Details of the selected row
cfgrid
cfdiv
tag to get data using a bind expression. It uses binding
807
Ext JavaScript
Library.
"Using Ajax containers
region.
cfdiv
in a bind parameter. As
region.

Advertisement

Table of Contents
loading

Table of Contents