Raymond, thank you very much for your help. that was it.


-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 9:38 AM
To: CF-Talk
Subject: RE: Custom Tag Question


That is because you did not pass the query to the custom tag, but the
name of the query. You can fix this two ways.

1) In your custom tag, do <cfoutput
query="caller.#attributes.queryname#">, however, in general, it's not
good practice to refer to variables outside the custom tag.

2) Pass the actual query
<cf_mytag query="#get_users#">

Then your cfquery would be

<cfoutput query="attributes.query"> (Notice, no # marks.)

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
Member of Team Macromedia

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: John Stanley [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 11, 2003 8:29 AM
> To: CF-Talk
> Subject: Custom Tag Question
> 
> 
> I am creating a custom tag that will display the results of a 
> query. I know there are already some out there, but I wanna 
> do it myself.
> 
> I have an attribute called queryname that i refer to in the 
> call of the custom tag.
> 
> <cf_mytag queryname="get_users">
> 
> inside the custom tag i refer to it as attributes.queryname 
> as in the following
> 
> <cfoutput query="#attributes.queryname#">
>       blah blah 
> </cfoutput>
> 
> I keep getting the following error.
> 
> Attribute validation error for tag cfoutput.  
> The value of the attribute query, which is currently 
> "get_users", is invalid.  
>   
> The error occurred in C:\CFusionMX\CustomTags\tabledata.cfm: line 20
>  
> 18 :          <th></th>&nbsp;</th>
> 19 :      </tr>
> 20 :  <cfoutput query="#attributes.queryname#">
>  
> 
> I have called the custom tag after the query. Does the custom 
> tag still execute first? The custom tag appears before the 
> query in debugging.
> 
> If so what is a competent work around for this problem.?
>  
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to