> Am I right in thinking that you could also
> assign the query to the request scope in the calling
> page and reference it that way in the tag?
Yes, you could. However, from a best practices perspective, you'd want to be
careful about doing that, as the Request scope is shared by all scripts
within a single request.
Ideally, when you write a custom tag, you write it so that it's
self-contained: all of the data it needs are contained within attributes,
and all the return values are created using variable names specified by the
caller. While the Request scope is handy for deeply-nested and recursive
custom tags, using that scope as a shared area between custom tag and
calling page violates the self-containment mentioned above.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists