Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 733

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Structuring tree controls
Tree controls built with the
cftree
entries helps you handle the most complex
cftreeitem
Creating a one-level tree control
The following example consists of a single root and some individual items:
<cfquery name="deptquery" datasource="cfdocexamples">
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">
img="folder,document">
</cftree>
<br>
<cfinput type="submit" value="Submit">
</cfform>
Creating a multilevel tree control
When populating a
control, you create the multilevel structure of the tree by specifying a parent for each item
cftree
in the tree. The
attribute of the
parent
elements in the tree.
In this example, every
cftreeitem
tag specifies Divisions as its parent.
The following code populates the tree directly, not from a query:
tag can be complex. Knowing how to specify the relationship between multiple
cftree
tag allows your
cftreeitem
tag, except the top level Divisions, specifies a parent. For example, the
Last updated 1/20/2012
constructs.
tag to show relationships between
cftree
728
cftreeitem

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents