Cftree Form Variables; Input Validation - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Building Tree Controls with cftree
Reviewing the code
The following table describes the highlight code and its function:
Code
ORDER BY Dept_ID
<cftreeitem value="Dept_ID,
queryasroot="Dept_ID"
img="cd,folder">
Note that the
correspond to the tree level structure. If you leave out the
uses the folder image for all levels in the tree except the individual items, which have
bullets.

cftree form variables

The
setting the
ColdFusion passes two form variables to the application page specified in the
action
To return the root part of the path, set the
otherwise, the path value starts with the first node. If you specify a root name in
queryastroot
In the previous example, if the user selects the name "John Allen" in the tree, the
following form variables are returned by ColdFusion:
Form.tree1.node = John Allen
You can specify the character used to delimit each element of the path form variable
in the

Input validation

Although, the
required
you can use the
validation.
FullName"
cftreeitem
tag allows you to force a user to select an item from the tree control by
cftree
attribute to Yes. With or without the
required
attribute:
Form.treename.node Returns the node of the user selection.
Form.treename.path Returns the complete path of the user selection, in the
form: [root]\node1\node2\node_n\value
, that value gets returned as the root.
Form.tree1.path = Dept_ID\3\John Allen
cftree delimiter
does not include a
cftree
attribute to force a user to select an item from the tree control. In addition,
onvalidate
Description
Order the query results by department.
Populate the tree with the Department ID, and under
each department, the Full Name for each employee
in the department.
Label the root "Dept_ID".
Use the ColdFusion-supplied CD image for the root
level and Folder image for the department IDs. The
names are preceded by a bullet.
comma-separated
img
completepath
attribute. The default is a backslash.
validate
attribute to specify the JavaScript code to perform
and the
attributes both
value
attribute, ColdFusion
img
attribute,
required
attribute of
cftree
attribute, you can use the
149
cftree
to Yes;

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents