Adobe COLDFUSION 9 Manual page 225

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
The following example shows a
<cftree name="tree1"
required="Yes"
hscroll="No">
<cftreeitem value=fullname
query="engquery"
queryasroot="Yes"
img="folder,document">
</cftree>
The calling tag is known as an ancestor, parent, or base tag; the tags that ancestor tags call are known as descendant,
child, or sub tags. Together, the ancestor and all descendant tags are called collaborating tags.
In order to nest tags, the parent tag must have a closing tag.
The following table lists the terms that describe the relationships between nested tags:
Calling tag
Tag nested within the calling tag
Ancestor
Descendant
Parent
Child
Base tag
Sub tag
You can create multiple levels of nested tags. In this case, the sub tag becomes the base tag for its own sub tags. Any
tag with an end tag present can be an ancestor to another tag.
Nested custom tags operate through three modes of processing, which are exposed to the base tags through the variable
.
thisTag.ExecutionMode
Passing data between nested custom tags
A key custom tag feature is for collaborating custom tags to exchange complex data without user intervention, while
encapsulating each tag's implementation so that others cannot see it.
When you use nested tags, address the following issues:
• What data must be accessible?
• Which tags can communicate to which tags?
• How are the source and targets of the data exchange identified?
• What CFML mechanism is used for the data exchange?
What data is accessible?
To enable developers to obtain maximum productivity in an environment with few restrictions, CFML custom tags
can expose all their data to collaborating tags.
When you develop custom tags, document all variables that collaborating tags can access and/or modify. When your
custom tags collaborate with other custom tags,
make sure that they do not modify any undocumented data.
tag nested within a
cftreeitem
Description
An ancestor is any tag that contains other tags between its start and end tags.
A descendant is any tag called by a tag.
Parent and child are synonyms for ancestor and descendant.
A base tag is an ancestor that you explicitly associate with a descendant,
called a sub tag, with
Last updated 8/5/2010
tag:
cftree
cfassociate
.
220

Advertisement

Table of Contents
loading

Table of Contents