Monday, December 30, 2002

Expecting custom tag queries in the DWMX Bindings tab

Someone recently asked me:
Do you know of any way to make cfquery/recordsets contained in a custom tag show up in the bindings panel on the calling page in DWMX?

The bindings tab in DWMX lists any queries on your current page, among other things, because DWMX looks at your CF code and pulls out the CFQUERY tags and contents and renders them in the bindings tab for various purposes.

Sadly, though, the idea of expecting it to find such queries in a custom tag won't work and if you think about it, it's technically correct that it not do so on a couple of levels.

First, the bindings are for things available in the current page. Technically, because custom tags have isolated scopes, a query in there would not really be available to this page. One could argue that if the custom tag set the query to the caller scope, it would indeed then be available to it, but that's a bit much to expect DW to figure out. :-)

But there's still more to it than that. As further proof of the challenge for DWMX, note that it also can't offer the "Open Document" option as it might if you right-clicked on a CFINCLUDE or CFMODULE. In those cases, at least you could open the file in question and see the bindings for it rather readily. But again DWMX can't even know what custom tag file to point to.

With the others, it can deduce the file name because it's provided as either a relative or absolute path/name. With a custom tag, it's really a run-time directive and so can't be determined at author time. The custom tag could exist in the current directory, the cfusion\customtags directory, or a subdirectory of that (or perhaps still another directory if the admin has setup alternative custom tag directories).

It's just impossible to expect DWMX to be able to figure it out.

PS Long time, no see to my blog fans. Just a busy holiday season with some pressing work challenges as well. Hope to be back in the swing of things now.

No comments: