Cfassociate - MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference

Cfml language reference
Table of Contents

Advertisement

16

CFASSOCIATE

The CFASSOCIATE tag allows sub-tag data to be saved with the base tag. This applies to
custom tags only.
Syntax
<CFASSOCIATE BASETAG="tagname"
DATACOLLECTION="collectionname">
BASETAG
Specifies the name of the base tag.
DATACOLLECTION
Optional. Specifies the name of the structure in which the base tag stores sub-tag
data. The default is AssocAttribs.
Usage
Call this tag within a sub-tag to save sub-tag data in the base tag.
ColdFusion saves sub-tag attributes in a structure whose default name is AssocAttribs.
Use the DataCollection attribute to specify a non-default structure name. Specify a
non-default structure name when the base tag can have multiple sub tags and you
want to segregate sub-tag attributes.
If the custom tag uses an attribute collection, the attributes passed in the attribute
collection are saved as independent attribute values, with no indication that they were
grouped together in a structure within the custom tag.
Example
<!--- Find the context --->
<CFIF thisTag.executionMode is "start">
<!--- Associate attributes
This code occurs in a custom tag's
sub tag. --->
<CFASSOCIATE BASETAG="CF_TAGBASE">
<!--- Define defaults for attributes --->
<CFPARAM NAME="attributes.happy" DEFAULT="Yes">
<CFPARAM NAME="attributes.sad" DEFAULT="No">
...
CFML Language Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents