Restrict the user from editing the excel sheet exported using cfcontent tag.

2014-06-14 Thread Sathyanarayanan Ramanathan

Dear Friends,

Is there anyway we can restrict the user from editing the excel sheet
exported using cfcontent tag.


Your time & help is really appreciated.

Thanks&Regards,
Sathya


~|
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:358740
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT: EXT grid timeout

2014-06-14 Thread John M Bliss

Confirmed: only happens in Firefox. Thanks, Cameron.


On Sat, Jun 14, 2014 at 10:28 AM, Cameron Childress 
wrote:

>
> On Sat, Jun 14, 2014 at 10:16 AM, John M Bliss wrote:
> >
> > So I added this code to increase our EXT grid timeout from 2.5 minutes
> > to 10 minutes:
> >
> > Any ideas?
>
>
> I am not sure I would try to work with AJax data that took that long to
> return. You have so many variables with different browsers (with their own
> timeouts) and JS involved and async stuff that's so hard to debug. I am
> sure it's possible, but this smells like something that will cause you to
> go insane, eventually.
>
> If I were you I would either try to get that server reply WAY WAY faster
> than 5 minutes (?!?!?!?!) or just use plain ole HTML for this data.
>
> -Cameron
>
> ...
>
>
> 

~|
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:358739
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT: EXT grid timeout

2014-06-14 Thread Jon Clausen

How many records are returned to populate the grid?  If it’s taking 5+ minutes 
to complete, then the number of records, the table or query optimization is 
probably the more important issue.I would suggest the following:

1) Implement a paging solution with OFFSET/LIMIT - You can use AJAX to page the 
results.
2) Optimize your SELECT statement to ensure that the the JSON object produced 
is as fast as possible.
3) If you’re using a web service, over which you have no control of the number 
of records returned in the query, then implement a two-phase approach to first 
pull the data and cache it locally with a time out (file-based or database, 
your call), then manipulate the records via the above suggestions.  Your 
request flow could show a “Fetching Results” with a .complete() event to handle 
running a new function to populate the grid when the local AJAX request returns 
the 200.

HTH,
Jon


On Jun 14, 2014, at 10:16 AM, John M Bliss  wrote:

> 
> Hi!
> 
> So I added this code to increase our EXT grid timeout from 2.5 minutes to
> 10 minutes:
> 
> Ext.onReady(function(){
>Ext.Ajax.timeout = 60;
> });
> 
> So now, EXT grids will wait longer for CF to return the JSON to populate
> the grids. Works great under about 5 minutes. The problem is: *above* 5
> minutes, when the request for the JSON finally finishes (I can see this
> happening via FusionReactor), the grid's "spinner" just keeps spinning.
> Like it's no longer listening for the JSON request to complete.
> 
> Any ideas?
> 
> -- 
> John Bliss - http://www.linkedin.com/in/jbliss
> 
> 
> 

~|
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:358738
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT: EXT grid timeout

2014-06-14 Thread Cameron Childress

On Sat, Jun 14, 2014 at 10:16 AM, John M Bliss wrote:
>
> So I added this code to increase our EXT grid timeout from 2.5 minutes
> to 10 minutes:
>
> Any ideas?


I am not sure I would try to work with AJax data that took that long to
return. You have so many variables with different browsers (with their own
timeouts) and JS involved and async stuff that's so hard to debug. I am
sure it's possible, but this smells like something that will cause you to
go insane, eventually.

If I were you I would either try to get that server reply WAY WAY faster
than 5 minutes (?!?!?!?!) or just use plain ole HTML for this data.

-Cameron

...


~|
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:358737
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


SOT: EXT grid timeout

2014-06-14 Thread John M Bliss

Hi!

So I added this code to increase our EXT grid timeout from 2.5 minutes to
10 minutes:

Ext.onReady(function(){
Ext.Ajax.timeout = 60;
});

So now, EXT grids will wait longer for CF to return the JSON to populate
the grids. Works great under about 5 minutes. The problem is: *above* 5
minutes, when the request for the JSON finally finishes (I can see this
happening via FusionReactor), the grid's "spinner" just keeps spinning.
Like it's no longer listening for the JSON request to complete.

Any ideas?

-- 
John Bliss - http://www.linkedin.com/in/jbliss


~|
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:358736
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-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.



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
>
>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
>
>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: Error please site is down for a month now moms site

2014-06-14 Thread M.A. Kruger

Matthew, 

the  tag at the end of the code should be removed OR a 
 tag should be added to the top of the file. the two tags serve as 
bookends and work together. one cannot exist without the other. 

Sent from my iPhone

> On Jun 14, 2014, at 8:14 AM, Matthew Smith  wrote:
> 
> 
>  returntype="void" hint="Unlocks items for paypal.">
>  
>  
>  
>name="qry_unlock_items_for_paypal"
>datasource="#variables.datasource#">
>exec [proc_rhkprod_unlock_items_for_paypal] @app_user_id = 
> ;
>
>
>name="qry_unlock_items_for_paypal"
>datasource="#variables.datasource#">
>exec [proc_rhkprod_unlock_items_for_paypal] @cfuserid = 
> ;
>
>  
> 
>  output="no" returntype="void" hint="Unlocks items for paypal that have been 
> locked for 15 minutes or more.">
>  name="qry_unlock_items_for_paypal_15_minutes"
>datasource="#variables.datasource#">
>exec [proc_rhkprod_unlock_items_for_paypal_15_minutes];
>
> 
> 
> 
> 
> USE [redhotkitties2005db]
> GO
> /** Object:  StoredProcedure 
> [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes]Script Date: 
> 06/13/2014 20:41:53 **/
> SET ANSI_NULLS ON
> GO
> SET QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes] 
> AS
> BEGIN
>SET NOCOUNT ON;
> 
>declare @tablePK int
>,@tblproductsfk int
>,@quantity int
> 
>declarec777 cursor forward_only for
>selecttablepk
>,tblProductsFK
>,quantity
>fromrhkprod_tblpaypallock
>WHERE   (timestamp <= DATEADD(mi, - 15, GETDATE()))
> 
>open c777
> 
>fetch next
>fromc777
>into@tablepk
>,@tblproductsfk
>,@quantity
> 
>while @@fetch_status = 0
> 
>begin
> 
>updaterhkprod_tblproducts
>setquantity = quantity + @quantity
>whereproductid = @tblproductsfk
>andUorLorUL in ('U','L')
> 
>delete fromrhkprod_tblpaypallock
>wheretablepk = @tablepk
> 
>fetch next
>fromc777
>into@tablepk
>,@tblproductsfk
>,@quantity
>end
> 
> 
> 
>close c777
> 
>deallocate c777
> 
> END
> 
> 
> 
>> On Fri, Jun 13, 2014 at 8:40 PM, Matthew Smithwrote:
>> 
>>  
>>  
>>  
>>  > app_user_id="#arguments.app_user_id#", cfuserid="#arguments.cfuserid#" ) />
>> 
>> > returntype="void">
>>  
>>  > qry.qry_unlock_items_for_paypal_15_minutes() />
>> 
>> > output="no">
>>  
>>  
>>  >
>> app_user_id = "#arguments.app_user_id#"
>>  ) />
>> 
> 
> 
>> On Jun 13, 2014, at 20:42, Matthew Smith  wrote:
>> 
>> > returntype="void" hint="Unlocks items for paypal.">
>>  
>>  
>>  
>>>name="qry_unlock_items_for_paypal"
>>datasource="#variables.datasource#">
>>exec [proc_rhkprod_unlock_items_for_paypal] @app_user_id = 
>> ;
>>
>>
>>>name="qry_unlock_items_for_paypal"
>>datasource="#variables.datasource#">
>>exec [proc_rhkprod_unlock_items_for_paypal] @cfuserid = 
>> ;
>>
>>  
>> 
>> > output="no" returntype="void" hint="Unlocks items for paypal that have been 
>> locked for 15 minutes or more.">
>>  >name="qry_unlock_items_for_paypal_15_minutes"
>>datasource="#variables.datasource#">
>>exec [proc_rhkprod_unlock_items_for_paypal_15_minutes];
>>
>> 
>> 
>> 
>> 
>> USE [redhotkitties2005db]
>> GO
>> /** Object:  StoredProcedure 
>> [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes]Script Date: 
>> 06/13/2014 20:41:53 **/
>> SET ANSI_NULLS ON
>> GO
>> SET QUOTED_IDENTIFIER ON
>> GO
>> ALTER PROCEDURE [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes] 
>> AS
>> BEGIN
>>SET NOCOUNT ON;
>> 
>>declare @tablePK int
>>,@tblproductsfk int
>>,@quantity int
>> 
>>declarec777 cursor forward_only for
>>selecttablepk
>>,tblProductsFK
>>,quantity
>>fromrhkprod_tblpaypallock
>>WHERE   (timestamp <= DATEADD(mi, - 15, GETDATE()))
>> 
>>open c777
>> 
>>fetch next
>>fromc777
>>into@tablepk
>>,@tblproductsfk
>>,@quantity
>> 
>>while @@fetch_status = 0
>> 
>>begin
>> 
>>updaterhkprod_tblproducts
>>setquantity = quantity + @quantity
>>whereproductid = @tblproductsfk
>>andUorLorUL in ('U','L')
>> 
>>delete fromrhkprod_tblpaypallock
>>wheretablepk = @tablepk
>> 
>>fetch next
>>fromc777
>>into@tablepk
>>

Re: Error please site is down for a month now moms site

2014-06-14 Thread Matthew Smith


  
  
  

exec [proc_rhkprod_unlock_items_for_paypal] @app_user_id = 
;



exec [proc_rhkprod_unlock_items_for_paypal] @cfuserid = 
;

  


  
exec [proc_rhkprod_unlock_items_for_paypal_15_minutes];





USE [redhotkitties2005db]
GO
/** Object:  StoredProcedure 
[dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes]Script Date: 
06/13/2014 20:41:53 **/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes] 
AS
BEGIN
SET NOCOUNT ON;

declare @tablePK int
,@tblproductsfk int
,@quantity int

declarec777 cursor forward_only for
selecttablepk
,tblProductsFK
,quantity
fromrhkprod_tblpaypallock
WHERE   (timestamp <= DATEADD(mi, - 15, GETDATE()))

open c777

fetch next
fromc777
into@tablepk
,@tblproductsfk
,@quantity

while @@fetch_status = 0

begin

updaterhkprod_tblproducts
setquantity = quantity + @quantity
whereproductid = @tblproductsfk
andUorLorUL in ('U','L')

delete fromrhkprod_tblpaypallock
wheretablepk = @tablepk

fetch next
fromc777
into@tablepk
,@tblproductsfk
,@quantity
end



close c777

deallocate c777

END



> On Fri, Jun 13, 2014 at 8:40 PM, Matthew Smithwrote:
> 
>   
>   
>   
>app_user_id="#arguments.app_user_id#", cfuserid="#arguments.cfuserid#" ) />
> 
>  returntype="void">
>   
>qry.qry_unlock_items_for_paypal_15_minutes() />
> 
>  output="no">
>   
>   
>
> app_user_id = "#arguments.app_user_id#"
>   ) />
> 


> On Jun 13, 2014, at 20:42, Matthew Smith  wrote:
> 
>  returntype="void" hint="Unlocks items for paypal.">
>   
>   
>   
>  name="qry_unlock_items_for_paypal"
> datasource="#variables.datasource#">
> exec [proc_rhkprod_unlock_items_for_paypal] @app_user_id = 
> ;
> 
> 
>  name="qry_unlock_items_for_paypal"
> datasource="#variables.datasource#">
> exec [proc_rhkprod_unlock_items_for_paypal] @cfuserid = 
> ;
> 
>   
> 
>  output="no" returntype="void" hint="Unlocks items for paypal that have been 
> locked for 15 minutes or more.">
>name="qry_unlock_items_for_paypal_15_minutes"
> datasource="#variables.datasource#">
> exec [proc_rhkprod_unlock_items_for_paypal_15_minutes];
> 
> 
> 
> 
> 
> USE [redhotkitties2005db]
> GO
> /** Object:  StoredProcedure 
> [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes]Script Date: 
> 06/13/2014 20:41:53 **/
> SET ANSI_NULLS ON
> GO
> SET QUOTED_IDENTIFIER ON
> GO
> ALTER PROCEDURE [dbo].[proc_rhkprod_unlock_items_for_paypal_15_minutes] 
> AS
> BEGIN
> SET NOCOUNT ON;
> 
> declare @tablePK int
> ,@tblproductsfk int
> ,@quantity int
> 
> declarec777 cursor forward_only for
> selecttablepk
> ,tblProductsFK
> ,quantity
> fromrhkprod_tblpaypallock
> WHERE   (timestamp <= DATEADD(mi, - 15, GETDATE()))
> 
> open c777
> 
> fetch next
> fromc777
> into@tablepk
> ,@tblproductsfk
> ,@quantity
> 
> while @@fetch_status = 0
> 
> begin
> 
> updaterhkprod_tblproducts
> setquantity = quantity + @quantity
> whereproductid = @tblproductsfk
> andUorLorUL in ('U','L')
> 
> delete fromrhkprod_tblpaypallock
> wheretablepk = @tablepk
> 
> fetch next
> fromc777
> into@tablepk
> ,@tblproductsfk
> ,@quantity
> end
> 
> 
> 
> close c777
> 
> deallocate c777
> 
> END
> 
> 
> 
>> On Fri, Jun 13, 2014 at 8:40 PM, Matthew Smith  wrote:
>> 
>>   
>>   
>>   
>>   > app_user_id="#arguments.app_user_id#", cfuserid="#arguments.cfuserid#" ) />
>> 
>> > returntype="void">
>>   
>>   > qry.qry_unlock_items_for_paypal_15_minutes() />
>> 
>> > output="no">
>>   
>>   
>>   > 
>> app_user_id = "#arguments.app_user_id#"
>>   ) />
>> 
>> 
>> 
>>> On Fri, Jun 13, 2014 at 8:35 PM, Bryan Stevenson 
>>>  wrote:
>>> 
>>> Matt...post all code from the opening CFCOMPONENT tag to the closing
>>> CFCOMPONENT tag
>>> 
>>> All the stuff you have posted so far should be BETWEEN those tags
>>> 
>>> *Bryan Stevenson