Structuring Tree Controls - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

150

Structuring Tree Controls

Tree controls built with
relationship between multiple
most complex of
Example: one-level tree control
This example consists of a single root and a number of individual items:
<cfquery name="deptquery" datasource="CompanyInfo">
<cfform name="form1" action="submit.cfm">
<br>
<input type="submit" value="Submit">
</cfform>
Example: multilevel tree control
When populating a
cftreeitem
a parent. The
elements in the tree control. (This example populates the tree directly, not with a
query.)
<cfform name="form2" action="cfform_submit.cfm"
<cftree name="tree1" hscroll="No" vscroll="No"
cftree
SELECT Dept_ID, FirstName + ' ' + LastName
AS FullName
FROM Employee
ORDER BY Dept_ID
</cfquery>
<cftree name="tree1">
<cftreeitem value="FullName"
query="deptquery"
queryasroot="Department">
</cftree>
cftree
parent. In this example, every cf
attribute allows your
parent
method="Post">
border="No">
<cftreeitem value="Divisions">
<cftreeitem value="Development"
parent="Divisions" img="folder">
<cftreeitem value="Product One"
parent="Development">
<cftreeitem value="Product Two"
parent="Development">
<cftreeitem value="GUI"
parent="Product Two" img="document">
<cftreeitem value="Kernel"
parent="Product Two" img="document">
<cftreeitem value="Product Three"
parent="Development">
<cftreeitem value="QA"
can be very complex. Knowing how to specify the
cftree
entries will help you handle even the
cftreeitem
constructs.
, you manipulate the structure of the tree by specifying a
cftree
Chapter 9 Building Dynamic Forms
, except the top level, specifies
treeitem
to show the relationships between

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents