Re: Calling a Custom Tag Twice Duplicates Query Results?

2014-06-14 Thread Steve 'Cutter' Blades

Definitely depends on the content of the custom tag itself. The first 
thing I notice is that none of the variables are scoped (not even the 
query name), and that could just be all kinds of fun.

First thing I would do is, inside of that tag code, dump the 
attributes.NetID value. Each run of the tag will run separately, so you 
can at least make sure that a different value is passed on each request.

cfdump var=#attributes.NetID#

Scope all variables, regardless of which scope they're in.

Steve 'Cutter' Blades
Adobe Community Professional
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

http://cutterscrossing.com


Co-Author Learning Ext JS 3.2 Packt Publishing 2010
https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book

The best way to predict the future is to help create it

On 5/28/2014 1:50 PM, Dan LeGate wrote:
 Okay, so I've been trying to solve a problem I'm having with a Custom
 Tag I wrote to do ldap lookups.

 The QueryName attribute gets passed in, along with a FilterValue.

 My problem is that when I call this tag twice or more within one page,
 the results of the FIRST lookup seem to stick and the second lookup
 doesn't work

 First lookup: value of NetID is ab1234

 cf_ldap_lookup
   QueryName  = GetLDAPInfo
   FilterName = UserID
   FilterValue= #NetID#
   UserID = Yes
   FullName   = Yes
   LastName   = Yes
   FirstName  = Yes
   Department = Yes
   EmplID = Yes
   StaffEmail = Yes

 Second lookup: value of NetID is xy6789

 cf_ldap_lookup
   QueryName  = GetLDAPInfoContact
   FilterName = UserID
   FilterValue= #NetID#
   UserID = Yes
   FullName   = Yes
   LastName   = Yes
   FirstName  = Yes
   Department = Yes
   EmplID = Yes
   StaffEmail = Yes

 When I reference #GetLDAPInfoContact.FirstName# it contains the value
 for #GetLDAPInfo.FirstName#

 Is there some sort of caching happening when a Custom Tag is called more
 than once?

 This is CFMX 7, btw. :-\

 I thought by dynamically changing the Query Name value within the Custom
 Tag it would solve this (it used to be the same query name each time the
 Custom Tag was called), but that wasn't it.

 Any insight is appreciated.

 Thanks!

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358735
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Calling a Custom Tag Twice Duplicates Query Results?

2014-05-30 Thread Scott Brady

On Wed, May 28, 2014 at 1:57 PM, Phillip Vector vec...@mostdeadlygame.com
wrote:


 Also, it's either MX or 7. :)


No, Dan was right. Version 7 was ColdFusion MX 7.  Which is just kind of a
weird way to number it.


-- 
-
Scott Brady
http://www.scottbrady.net/


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358703
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Calling a Custom Tag Twice Duplicates Query Results?

2014-05-30 Thread Carl Von Stetten

Yup, MX was attached to the version numbers of both ColdFusion 
releases that Macromedia was responsible for.  Adobe dropped the MX 
when they released ColdFusion 8.
On 5/30/2014 8:19 AM, Scott Brady wrote:
 On Wed, May 28, 2014 at 1:57 PM, Phillip Vector vec...@mostdeadlygame.com
 wrote:

 Also, it's either MX or 7. :)


 No, Dan was right. Version 7 was ColdFusion MX 7.  Which is just kind of a
 weird way to number it.




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358704
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Calling a Custom Tag Twice Duplicates Query Results?

2014-05-28 Thread Dan LeGate

Okay, so I've been trying to solve a problem I'm having with a Custom 
Tag I wrote to do ldap lookups.

The QueryName attribute gets passed in, along with a FilterValue.

My problem is that when I call this tag twice or more within one page, 
the results of the FIRST lookup seem to stick and the second lookup 
doesn't work

First lookup: value of NetID is ab1234

cf_ldap_lookup
 QueryName  = GetLDAPInfo
 FilterName = UserID
 FilterValue= #NetID#
 UserID = Yes
 FullName   = Yes
 LastName   = Yes
 FirstName  = Yes
 Department = Yes
 EmplID = Yes
 StaffEmail = Yes

Second lookup: value of NetID is xy6789

cf_ldap_lookup
 QueryName  = GetLDAPInfoContact
 FilterName = UserID
 FilterValue= #NetID#
 UserID = Yes
 FullName   = Yes
 LastName   = Yes
 FirstName  = Yes
 Department = Yes
 EmplID = Yes
 StaffEmail = Yes

When I reference #GetLDAPInfoContact.FirstName# it contains the value 
for #GetLDAPInfo.FirstName#

Is there some sort of caching happening when a Custom Tag is called more 
than once?

This is CFMX 7, btw. :-\

I thought by dynamically changing the Query Name value within the Custom 
Tag it would solve this (it used to be the same query name each time the 
Custom Tag was called), but that wasn't it.

Any insight is appreciated.

Thanks!

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358699
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Calling a Custom Tag Twice Duplicates Query Results?

2014-05-28 Thread Phillip Vector

Considering we don't see the tag code, I would suspect it's because all the
options for it are exactly the same. So it's running the same query.

This is CFMX 7, btw. :-\

Also, it's either MX or 7. :)




On Wed, May 28, 2014 at 11:50 AM, Dan LeGate d...@legeek.com wrote:


 Okay, so I've been trying to solve a problem I'm having with a Custom
 Tag I wrote to do ldap lookups.

 The QueryName attribute gets passed in, along with a FilterValue.

 My problem is that when I call this tag twice or more within one page,
 the results of the FIRST lookup seem to stick and the second lookup
 doesn't work

 First lookup: value of NetID is ab1234

 cf_ldap_lookup
  QueryName  = GetLDAPInfo
  FilterName = UserID
  FilterValue= #NetID#
  UserID = Yes
  FullName   = Yes
  LastName   = Yes
  FirstName  = Yes
  Department = Yes
  EmplID = Yes
  StaffEmail = Yes

 Second lookup: value of NetID is xy6789

 cf_ldap_lookup
  QueryName  = GetLDAPInfoContact
  FilterName = UserID
  FilterValue= #NetID#
  UserID = Yes
  FullName   = Yes
  LastName   = Yes
  FirstName  = Yes
  Department = Yes
  EmplID = Yes
  StaffEmail = Yes

 When I reference #GetLDAPInfoContact.FirstName# it contains the value
 for #GetLDAPInfo.FirstName#

 Is there some sort of caching happening when a Custom Tag is called more
 than once?

 This is CFMX 7, btw. :-\

 I thought by dynamically changing the Query Name value within the Custom
 Tag it would solve this (it used to be the same query name each time the
 Custom Tag was called), but that wasn't it.

 Any insight is appreciated.

 Thanks!

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358700
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm