User Guide

Table Of Contents
634 Chapter 27: Building Dynamic Forms with cfform Tags
Browser considerations
The applet-based versions of the
cfgrid, cfslider, and cftree forms use JavaScript and Java to
display their 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,
particularly older versions of Netscape, require you to navigate some simple option windows.
Because the controls use JavaScript to return data to ColdFusion, if you disable JavaScript in your
browser, it cannot properly run forms that contain these controls. In that case, the controls still
display, but data return and validation does not work and you can receive a JavaScript error.
Because Java is handled by the plug-in and not directly by the browser, disabling Java execution in
the browser does not affect the operation of the controls. If for some other reason, however, the
browser is unable to render the controls as requested, a "not supported" message appears in place
of the control.
You can use the
cfform tag’s notsupported attribute to specify an alternative error message.
You can avoid browser Java and JavaScript issues with the
cfgrid and cftree controls by using
the Flash format versions of these controls. These controls work on Windows, Mac OS X, and
Linux, and do not rely on Java support. There is no Flash format version of the
cfslider control,
and there is no applet format version of the
cfcalendar control.
Building tree controls with the cftree tag
The cftree tag lets you display hierarchical information within a form in a space-saving
collapsible tree populated from data source queries. To build a tree control with the
cftree tag,
you use individual
cftreeitem tags to populate the control..
You can create trees in three formats:
Applet Creates a Java applet that the client must download. Downloading an applet takes time;
therefore, using the
cftree tag can be slightly slower than using an HTML form element to
retrieve the same information. In addition, browsers must be Java-enabled for the
cftree tag to
work properly.
Flash Generates a Flash control that you can include in an HTML or Flash format form. For
more information on Flash Format see Chapter 29, “Creating Forms in Macromedia Flash,” on
page 687.
Object Creates a hierarchical ColdFusion structure that represents the tree data and many of the
cftree and cftreeitem attributes.
The different formats support different sets of features and attributes. This section discusses
general techniques that apply to all three formats, and indicates any techniques that do not apply
to a specific format. It uses applet format for all examples, which use applet-specific attributes.
For details on the features and attributes supported in each format, see the
cftree entry in
CFML Reference.