Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 729

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Control
Description
cfinput
Equivalent to the HTML
cfselect
Displays a selection box. Equivalent to the HTML
addition of input validation.
cfslider
Creates a Java applet-based control that lets users enter data by moving
a slider. Not supported in Flash format forms.
cftextarea
Displays a text input area. Equivalent to the HTML
the addition of input validation.
cftree
Creates a Java applet or Flash hierarchical tree-format control that can
include graphical images for the different elements. Can also generate
a ColdFusion structure that represents the tree data and attributes.
Preserving input data with the preservedata attribute
The
attribute tells ColdFusion to continue displaying the user data in a form after the user
cfformpreservedata
submits the form. Data is preserved in the
controls populated by queries. If you specify a default value for a control, and a user overrides that default in the form,
the user input is preserved.
You can retain data on the form when the same page contains the form and the form's action code; that is, the form
submits to itself. You can also retain the data if the action page has a copy of the form, and the control names are the
same in the forms on both pages. (The action page form need not be identical to the initial form. It can have more or
fewer elements than the initial page form; only the form elements with identical names on both pages keep their data.)
Note: The
setting on the action page controls the preservation of the data.
preservedata
For example, if you save this form as preserve.cfm, it continues to display any text that you enter after you submit it,
as follows:
<cfform action="preserve.cfm" preservedata="Yes">
<p>Please enter your name:
<cfinput type="Text" name="UserName" required="Yes"><p>
<input type="Submit" name=""> <input type="RESET">
</cfform>
Usage notes for the preservedata attribute
When you use the
preservedata
• In the
tag, the
cftree
preservedata
to work correctly, set the
• The
attribute has no effect on a
preservedata
data source with the new data (typically by using a
displays the updated database information.
Browser considerations
The applet-based versions of the
content. To allow them to display consistently across a variety of browsers, these applets use the Java plug-in. As a
result, they are independent of the level of Java support provided by the browser.
ColdFusion downloads and installs the browser plug-in if necessary. Some browsers display a single permission dialog
box asking you to confirm the plug-in installation. Other browsers, like older versions of Netscape, require you to
navigate some simple option windows.
input
tag, with the addition of input validation.
,
cfinput
cfslider
attribute, follow these guidelines:
attribute causes the tree to expand to the previously selected element. For this
attribute to True.
completePath
cfgrid
cfgridupdate
,
, and
cfgrid
cfslider
Last updated 1/20/2012
For more information
"Creating a basic
tag, with the
"Building drop-down list
select
page 731
"Building slider bar
tag, with
The cftextarea tag in the CFML Reference
textarea
"Building tree controls with the cftree
on page 725
,
, and
cftextinput
cftree
tag. If you populate the control from a query, update the
tag) before redisplaying the grid. The grid then
forms use JavaScript and Java to display their
cftree
form" on page 704
boxes" on
controls" on page 732
tag"
controls and in
cfselect
724

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents