MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 588

Developing coldfusion mx applications
Table of Contents

Advertisement

To organize the tree based on ordered results of a query:
Create a ColdFusion page named tree2.cfm with the following content:
1
<!--- CFQUERY with an ORDER BY clause --->
<cfquery name="deptquery" datasource="CompanyInfo">
SELECT Dept_ID, FirstName + ' ' + LastName
AS FullName
FROM Employee
ORDER BY Dept_ID
</cfquery>
<!--- Build the tree control --->
<cfform name="form1" action="submit.cfm">
<cftree name="tree1"
hscroll="No"
border="Yes"
height="350"
required="Yes">
<cftreeitem value="Dept_ID, FullName"
query="deptquery"
queryasroot="Dept_ID"
img="cd,folder">
</cftree>
<br>
<br><input type="Submit" value="Submit">
</cfform>
Save the page and view it in your browser.
2
588
Chapter 27: Building Dynamic Forms

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents