Executing Custom Tags; Tag Instance Data; Modes Of Execution; Specifying Execution Modes - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Executing Custom Tags

Executing Custom Tags

The following sections provide information on executing custom tags.

Tag instance data

When a custom tag page executes, ColdFusion keeps data related to the tag instance.
The
The behavior is similar to the
scope).
The following variables are generated by the
Variable
ExecutionMode
HasEndTag
GeneratedContent
AssocAttribs

Modes of execution

ColdFusion invokes a custom tag page in either of two modes:
If an end tag is not explicitly provided and shorthand empty element syntax
(<TagName .../>) is not used, the custom tag page gets invoked only once, in start tag
mode. If a tag must have an end tag provided, use
tag execution to validate this.
The same CFML page is executed for both the start and end tag of a custom tag.

Specifying execution modes

A variable with the reserved name
invocation of a custom tag page. The variable has one of the following values:
When the body of the custom tag (not the custom tag page or template) executes, the
value of the ExecutionMode variable is inactive.
built in structured variable preserves this data with a unique identifier.
thisTag
Description
Valid values are "start" and "end."
Used for code validation. It distinguishes between custom tags
that are called with and without end tags.
The content that has been generated by the tag. This includes
anything in the body of the tag, including the results of any active
content, such as ColdFusion variables and functions. You can
process this content as a variable.
Holds the attributes of all nested tags if you use
make them available to the parent tags.
Start tag execution
End tag execution
Start start tag execution
End end tag execution
tag-specific variable (sometimes called the File
File
thisTag
thisTag.ExecutionMode
structure:
cfassociate
thisTag.HasEndTag
will specify the mode of
185
to
during start

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 5

Table of Contents