Structuring Tree Controls - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Structuring tree controls

Tree controls built with
between multiple
Creating a one-level tree control
The following example consists of a single root and a number of individual items:
<cfquery name="deptquery" datasource="CompanyInfo">
SELECT Dept_ID, FirstName + ' ' + LastName
AS FullName
FROM Employee
ORDER BY Dept_ID
</cfquery>
<cfform name="form1" action="submit.cfm">
<cftree name="tree1">
<cftreeitem value="FullName"
query="deptquery"
queryasroot="Department">
</cftree>
<br>
<input type="submit" value="Submit">
</cfform>
Creating a multilevel tree control
The following figure shows an example of a multilevel tree:
When populating a
for each
cftreeitem
show relationships between elements in the tree.
In this example, every
the
cftreeitem
590
Chapter 27: Building Dynamic Forms
can be very complex. Knowing how to specify the relationship
cftree
entries helps you handle the most complex of
cftreeitem
, you create the multilevel structure of the tree by specifying a parent
cftree
in the tree. The
parent
, except the top level Divisions, specifies a parent. For example,
cftreeitem
Development specifies a parent of Divisions.
attribute of
cftreeitem
constructs.
cftree
allows your
to
cftree

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents