Adobe COLDFUSION 9 Manual page 221

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
---custom tag ---<br>
<cfoutput>#attributes.a# #attributes.x# #attributes.y#
#attributes.foo#</cfoutput><br>
--- end custom tag ---
its output is the following statement:
---custom tag ---
blab -X- -Y- 16
--- end custom tag ---
One use for
attributeCollection
is useful when you have one custom tag that calls a second custom tag and you want to pass all attributes from the first
tag to the second.
For example, you call a custom tag with the following code:
<cf_first attr1="foo" attr2="bar">
To pass all the attributes of the first custom tag to the second, you include the following statement in first.cfm:
<cf_second attributeCollection="#attributes#">
Within the body of second.cfm, you reference the parameters passed to it as follows:
<cfoutput>#attributes.attr1#</cfoutput>
<cfoutput>#attributes.attr2#</cfoutput>
Managing custom tags
If you deploy custom tags in a multideveloper environment or distribute your tags publicly, you can use the advanced
security and template encoding capabilities of ColdFusion.
The ColdFusion security framework enables you to selectively restrict access to individual tags or to tag directories.
This restriction can be an important safeguard in team development. For more information, see
Applications" on page 339.
You can use the command line utility
For more information, see Using the cfcompile utility in Configuring and Administering ColdFusion.
Executing custom tags
ColdFusion provides techniques for executing custom tags, including handling end tags and processing body text.
Accessing tag instance data
When a custom tag page executes, ColdFusion keeps data related to the tag instance in the
access the
structure from within your custom tag to control processing of the tag. The behavior is like that of
thisTag
the
tag-specific variable (sometimes called the File scope).
File
ColdFusion generates the variables in the following table and writes them to the
is to pass the entire Attributes scope of one custom tag to another. This technique
to precompile your custom tag files into Java class files or byte code.
cfcompile
Last updated 8/5/2010
"Securing
structure. You can
thisTag
structure:
thisTag
216

Advertisement

Table of Contents
loading

Table of Contents