
729
DEVELOPING
COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Las
t
upda
te
d 8/5/2010
<cfform name="form2" action="cfform_submit.cfm">
<cftree name="tree1" hscroll="No" vscroll="No"
border="No">
<cftreeitem value="Divisions">
<cftreeitem value="Development"
parent="Divisions" img="folder">
<cftreeitem value="Product One"
parent="Development" img="document">
<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" img="document">
<cftreeitem value="QA"
parent="Divisions" img="folder">
<cftreeitem value="Product One"
parent="QA" img="document">
<cftreeitem value="Product Two"
parent="QA" img="document">
<cftreeitem value="Product Three"
parent="QA" img="document">
<cftreeitem value="Support"
parent="Divisions" img="fixed">
<cftreeitem value="Product Two"
parent="Support" img="document">
<cftreeitem value="Sales"
parent="Divisions" img="computer">
<cftreeitem value="Marketing"
parent="Divisions" img="remote">
<cftreeitem value="Finance"
parent="Divisions" img="element">
</cftree>
</cfform>
Image names in a cftree tag
Note:
The information here applies to applet format trees. In Flash, you cannot control the tree icons. Flash uses open and
closed folders and documents as the icons. In object format, the image information is preserved in fields in the object
structure.
The default image displayed in a tree is a folder. However, you can use the
img
attribute of the
cftreeitem
tag to
specify a different image.
When you use the
img
attribute, ColdFusion displays the specified image beside the tree items when they are not open.
When you use the
imgopen
attribute, ColdFusion displays the specified image beside the tree items when they are open
(expanded). You can specify a built-in ColdFusion image name, the file path to an image file, or the URL of an image
of your choice, such as http://localhost/Myapp/Images/Level3.gif. You cannot use a custom image in Flash format. As
a general rule, make the height of your custom images less than 20 pixels.
When populating a
cftree
control with data from a
cfquery
tag, you can use the
img
attribute of
cftreeitem
tag to
specify images or filenames for each level of the tree as a comma-separated list.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...