CFGrid filter stops working after move from CF10 to CF11
We have a CF app that uses a CF_GRID with some filters to allow limiting the data retrieved. After moving the app from a host running CF10 to another host running CF11, the filters stopped working even though the other grid functions did not - grid still display data correctly and clicking column headers correctly sorts the grid. This is the contents of the cfgrid tag: cfgrid format=html name=pilotGrid pagesize=10 autowidth=yes selectmode=row appendKey=yes href=index.cfm?fuseaction=dsp_adm-pilot-detail hrefKey=userid bind=cfc:pilot_search.getPilots({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection}, '#attributes.pil_email#', '#attributes.pil_lname#', '#attributes.pil_n_number#') The bind parameter specifies a function, getPilots, in pilot_search.cfc. It passes 3 attributes/parameters to the function which are the contents of the 3 text filters - pil_email, pil_lname, pil_n_number. The function contains a query to retrieve the requested data including WHERE clauses based on the filter text entered. This is the content of the function and query contained in pilot_search.cfc: cffunction name=getPilots access=remote returntype=struct cfargument name=page required=true / cfargument name=pageSize required=true / cfargument name=gridsortcolumn required=true / cfargument name=gridsortdirection required=true / cfargument name=pil_email type=string required=no default= / cfargument name=pil_lname type=string required=no default= / cfargument name=pil_n_number type=string required=no default= / cfif arguments.gridsortcolumn eq cfset arguments.gridsortcolumn = pil_email / cfset arguments.gridsortdirection = asc / /cfif cfquery name=pilots datasource=hope select userid, pil_n_number, pil_email, pil_lname, pil_fname, pil_password, last_login from pilots where 0=0 and pil_email like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_email#% and pil_lname like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_lname#% and pil_n_number like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_n_number#% order by #arguments.gridsortcolumn# #arguments.gridsortdirection# /cfquery cfreturn queryconvertforgrid(pilots, page, pagesize) / /cffunction Does anyone know why the WHERE clauses in the query appear to be ignored when running the app with CF11 but work correctly with CF10? Or does anyone have a suggestion of how to best debug this? I can't seem to figure out how to view the contents of the 3 arguments used in the WHERE clauses to see why they might be being ignored or why the result set is not limited by the filters on CF11. Any insight or suggestions appreciated. Regards, Stephen ~| 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:358960 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
where 0 = 0 looks like its obsolete in that query, in other words it shouldn't be needed if you have no if statements there. As you said it works on ColdFusion 10, what would happen if you removed the 0 = 0 or replaced it with 1 = 1? Other than that I really can't see any other issue with it. When you say is ignored, are you saying records are returning or no records are being returned? You also don't indicate whether you have an error, so we can assume that what is calling this is working to some degree with records in the grid? Also there is a huge push to remove any UI tags from Application code, it might pay to think about moving away from the likes of the current CF UI stuff. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Wed, Jul 23, 2014 at 3:08 AM, Stephen Hait stephenh...@gmail.com wrote: We have a CF app that uses a CF_GRID with some filters to allow limiting the data retrieved. After moving the app from a host running CF10 to another host running CF11, the filters stopped working even though the other grid functions did not - grid still display data correctly and clicking column headers correctly sorts the grid. This is the contents of the cfgrid tag: cfgrid format=html name=pilotGrid pagesize=10 autowidth=yes selectmode=row appendKey=yes href=index.cfm?fuseaction=dsp_adm-pilot-detail hrefKey=userid bind=cfc:pilot_search.getPilots({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection}, '#attributes.pil_email#', '#attributes.pil_lname#', '#attributes.pil_n_number#') The bind parameter specifies a function, getPilots, in pilot_search.cfc. It passes 3 attributes/parameters to the function which are the contents of the 3 text filters - pil_email, pil_lname, pil_n_number. The function contains a query to retrieve the requested data including WHERE clauses based on the filter text entered. This is the content of the function and query contained in pilot_search.cfc: cffunction name=getPilots access=remote returntype=struct cfargument name=page required=true / cfargument name=pageSize required=true / cfargument name=gridsortcolumn required=true / cfargument name=gridsortdirection required=true / cfargument name=pil_email type=string required=no default= / cfargument name=pil_lname type=string required=no default= / cfargument name=pil_n_number type=string required=no default= / cfif arguments.gridsortcolumn eq cfset arguments.gridsortcolumn = pil_email / cfset arguments.gridsortdirection = asc / /cfif cfquery name=pilots datasource=hope select userid, pil_n_number, pil_email, pil_lname, pil_fname, pil_password, last_login from pilots where 0=0 and pil_email like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_email#% and pil_lname like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_lname#% and pil_n_number like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_n_number#% order by #arguments.gridsortcolumn# #arguments.gridsortdirection# /cfquery cfreturn queryconvertforgrid(pilots, page, pagesize) / /cffunction Does anyone know why the WHERE clauses in the query appear to be ignored when running the app with CF11 but work correctly with CF10? Or does anyone have a suggestion of how to best debug this? I can't seem to figure out how to view the contents of the 3 arguments used in the WHERE clauses to see why they might be being ignored or why the result set is not limited by the filters on CF11. Any insight or suggestions appreciated. Regards, Stephen ~| 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:358961 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
Here's the official replacement for cfgrid. Double-quotes because there're many way to replace cfgrid...this is just one suggestion. https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way/blob/master/chapters/cfgrid/index.md On Tue, Jul 22, 2014 at 1:34 PM, Andrew Scott andr...@andyscott.id.au wrote: where 0 = 0 looks like its obsolete in that query, in other words it shouldn't be needed if you have no if statements there. As you said it works on ColdFusion 10, what would happen if you removed the 0 = 0 or replaced it with 1 = 1? Other than that I really can't see any other issue with it. When you say is ignored, are you saying records are returning or no records are being returned? You also don't indicate whether you have an error, so we can assume that what is calling this is working to some degree with records in the grid? Also there is a huge push to remove any UI tags from Application code, it might pay to think about moving away from the likes of the current CF UI stuff. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Wed, Jul 23, 2014 at 3:08 AM, Stephen Hait stephenh...@gmail.com wrote: We have a CF app that uses a CF_GRID with some filters to allow limiting the data retrieved. After moving the app from a host running CF10 to another host running CF11, the filters stopped working even though the other grid functions did not - grid still display data correctly and clicking column headers correctly sorts the grid. This is the contents of the cfgrid tag: cfgrid format=html name=pilotGrid pagesize=10 autowidth=yes selectmode=row appendKey=yes href=index.cfm?fuseaction=dsp_adm-pilot-detail hrefKey=userid bind=cfc:pilot_search.getPilots({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection}, '#attributes.pil_email#', '#attributes.pil_lname#', '#attributes.pil_n_number#') The bind parameter specifies a function, getPilots, in pilot_search.cfc. It passes 3 attributes/parameters to the function which are the contents of the 3 text filters - pil_email, pil_lname, pil_n_number. The function contains a query to retrieve the requested data including WHERE clauses based on the filter text entered. This is the content of the function and query contained in pilot_search.cfc: cffunction name=getPilots access=remote returntype=struct cfargument name=page required=true / cfargument name=pageSize required=true / cfargument name=gridsortcolumn required=true / cfargument name=gridsortdirection required=true / cfargument name=pil_email type=string required=no default= / cfargument name=pil_lname type=string required=no default= / cfargument name=pil_n_number type=string required=no default= / cfif arguments.gridsortcolumn eq cfset arguments.gridsortcolumn = pil_email / cfset arguments.gridsortdirection = asc / /cfif cfquery name=pilots datasource=hope select userid, pil_n_number, pil_email, pil_lname, pil_fname, pil_password, last_login from pilots where 0=0 and pil_email like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_email#% and pil_lname like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_lname#% and pil_n_number like cfqueryparam cfsqltype=cf_sql_varchar value=%#arguments.pil_n_number#% order by #arguments.gridsortcolumn# #arguments.gridsortdirection# /cfquery cfreturn queryconvertforgrid(pilots, page, pagesize) / /cffunction Does anyone know why the WHERE clauses in the query appear to be ignored when running the app with CF11 but work correctly with CF10? Or does anyone have a suggestion of how to best debug this? I can't seem to figure out how to view the contents of the 3 arguments used in the WHERE clauses to see why they might be being ignored or why the result set is not limited by the filters on CF11. Any insight or suggestions appreciated. Regards, Stephen ~| 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:358962 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 1:34 PM, Andrew Scott andr...@andyscott.id.au wrote: where 0 = 0 looks like its obsolete in that query, in other words it shouldn't be needed if you have no if statements there. As you said it works on ColdFusion 10, what would happen if you removed the 0 = 0 or replaced it with 1 = 1? There were originally if statements checking each filter value for existence before adding to the WHERE clause which explains why the 0 = 0 was there. I tried removing the 0 = 0 as well as replacing it with 1 = 1 and the behaviour remained the same. When you say is ignored, are you saying records are returning or no records are being returned? You also don't indicate whether you have an error, so we can assume that what is calling this is working to some degree with records in the grid? When I say is ignored, I mean that if a value is entered in one or more of the filter fields, the result set is the same as if there were no WHERE clause at all. There is no error that I'm seeing. So yes, records are successfully populating the grid, there's just no longer an ability to limit the number of rows returned based on the filter criteria. Also there is a huge push to remove any UI tags from Application code, it might pay to think about moving away from the likes of the current CF UI stuff. I can understand this but I'm primarily interested at the moment with getting the previously working functionality back before I start looking at implementing a replacement. Thanks for your suggestions. ~| 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:358963 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 1:38 PM, John M Bliss bliss.j...@gmail.com wrote: Here's the official replacement for cfgrid. Double-quotes because there're many way to replace cfgrid...this is just one suggestion. https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way/blob/master/chapters/cfgrid/index.md Thanks, John. That looks like an interesting approach. I will definitely check into that if I can't get this issue resolved fairly quickly. Regards, Stephen ~| 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:358964 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 1:08 PM, Stephen Hait stephenh...@gmail.com wrote: Does anyone know why the WHERE clauses in the query appear to be ignored when running the app with CF11 but work correctly with CF10? Or does anyone have a suggestion of how to best debug this? I can't seem to figure out how to view the contents of the 3 arguments used in the WHERE clauses to see why they might be being ignored or why the result set is not limited by the filters on CF11. Any insight or suggestions appreciated. I would dump the argument scope to see if the arguments are actually being set. You might also use a variable and build your query are a text string, then dump that string to see what it contains. ~| 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:358965 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 2:01 PM, Maureen mamamaur...@gmail.com wrote: On Tue, Jul 22, 2014 at 1:08 PM, Stephen Hait stephenh...@gmail.com wrote: Or does anyone have a suggestion of how to best debug this? I can't seem to figure out how to view the contents of the 3 arguments used in the WHERE clauses to see why they might be being ignored or why the result set is not limited by the filters on CF11. I would dump the argument scope to see if the arguments are actually being set. You might also use a variable and build your query are a Thanks, Maureen! You helped be figure out how to see what the values of the arguments were. I dumped the arguments scope to a file and found that the three arguments I am passing into the function for filters were showing as [empty string] when using CF11 but were displaying as expected in CF10. Apparently something is different in CF11 when it comes to passing additional arguments/parameters to a .CFC to serve as filters for the data grid. Any idea what has changed since CF10 or how to deal with this? Thanks, Stephen ~| 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:358966 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
You could check your Chrome developer tools, to then see what ColdFusion via its Ajax / JS stuff is actually sending across as parameters as well. This would help to see what is actually being passed. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Wed, Jul 23, 2014 at 4:53 AM, Stephen Hait stephenh...@gmail.com wrote: On Tue, Jul 22, 2014 at 2:01 PM, Maureen mamamaur...@gmail.com wrote: On Tue, Jul 22, 2014 at 1:08 PM, Stephen Hait stephenh...@gmail.com wrote: Or does anyone have a suggestion of how to best debug this? I can't seem to figure out how to view the contents of the 3 arguments used in the WHERE clauses to see why they might be being ignored or why the result set is not limited by the filters on CF11. I would dump the argument scope to see if the arguments are actually being set. You might also use a variable and build your query are a Thanks, Maureen! You helped be figure out how to see what the values of the arguments were. I dumped the arguments scope to a file and found that the three arguments I am passing into the function for filters were showing as [empty string] when using CF11 but were displaying as expected in CF10. Apparently something is different in CF11 when it comes to passing additional arguments/parameters to a .CFC to serve as filters for the data grid. Any idea what has changed since CF10 or how to deal with this? Thanks, Stephen ~| 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:358967 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 3:04 PM, Andrew Scott andr...@andyscott.id.au wrote: You could check your Chrome developer tools, to then see what ColdFusion via its Ajax / JS stuff is actually sending across as parameters as well. This would help to see what is actually being passed. Andrew, That's a good suggestion, too. With Chrome developer tools and inspecting pilot_search.cfc, when using CF10, under Headers, Query String Parameters, it reports argumentCollection which includes a list of all the arguments and values passed from the CFGRID tag. When using CF11, under Headers, Query String Parameters, there is no argumentCollection item displayed. Instead, the four main built-in CFGRID arguments are each displayed on separate lines along with their values - page, pagesize, gridsortcolumn, gridsortdirection. I'm not sure what this means but it does seem to indicate that in CF11, the 3 additional arguments are not making it to the .cfc to be used there using the method that accomplishes this in CF10. If I can't get this sorted out soon, I may see if simply moving our app to a CF10 instance would resolve this for now. I could then concentrate on a longer term fix before CF10 is no longer supported. Thanks, Stephen ~| 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:358969 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
Stephen, Is this what you're experiencing? https://forums.adobe.com/thread/1490328 Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Wed, Jul 23, 2014 at 5:38 AM, Stephen Hait stephenh...@gmail.com wrote: On Tue, Jul 22, 2014 at 3:04 PM, Andrew Scott andr...@andyscott.id.au wrote: You could check your Chrome developer tools, to then see what ColdFusion via its Ajax / JS stuff is actually sending across as parameters as well. This would help to see what is actually being passed. Andrew, That's a good suggestion, too. With Chrome developer tools and inspecting pilot_search.cfc, when using CF10, under Headers, Query String Parameters, it reports argumentCollection which includes a list of all the arguments and values passed from the CFGRID tag. When using CF11, under Headers, Query String Parameters, there is no argumentCollection item displayed. Instead, the four main built-in CFGRID arguments are each displayed on separate lines along with their values - page, pagesize, gridsortcolumn, gridsortdirection. I'm not sure what this means but it does seem to indicate that in CF11, the 3 additional arguments are not making it to the .cfc to be used there using the method that accomplishes this in CF10. If I can't get this sorted out soon, I may see if simply moving our app to a CF10 instance would resolve this for now. I could then concentrate on a longer term fix before CF10 is no longer supported. Thanks, Stephen ~| 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:358970 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 4:10 PM, Andrew Scott andr...@andyscott.id.au wrote: Stephen, Is this what you're experiencing? https://forums.adobe.com/thread/1490328 Andrew, I don't think this is the same problem but it might be related. I had not noticed any javascript errors. Just to test, removed 2 of the 3 arguments leaving just a single argument being passed to the .CFC and referenced there. I still did not see the argument getting passed and a dump of the arguments scope still showed [empty string] as the value of the single argument, even though I entered a value. Thanks, Stephen ~| 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:358971 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
I know some things have changed with scope over the last few versions but not sure what changed when. Local scope for functions was added at some point. Make sure you are scoping all variables and declaring any that need to be with var. On Tue, Jul 22, 2014 at 2:53 PM, Stephen Hait stephenh...@gmail.com wrote: Apparently something is different in CF11 when it comes to passing additional arguments/parameters to a .CFC to serve as filters for the data grid. Any idea what has changed since CF10 or how to deal with this? ~| 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:358972 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 4:40 PM, Maureen mamamaur...@gmail.com wrote: I know some things have changed with scope over the last few versions but not sure what changed when. Local scope for functions was added at some point. Make sure you are scoping all variables and declaring any that need to be with var. Thanks, Maureen. I believe I am explicitly scoping all variables in this case. ~| 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:358973 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
I didn't see scopes on the variables in your return statement. cfreturn queryconvertforgrid(pilots, page, pagesize) / Not sure if that matters, but I would scope them just in case. On Tue, Jul 22, 2014 at 4:47 PM, Stephen Hait stephenh...@gmail.com wrote: On Tue, Jul 22, 2014 at 4:40 PM, Maureen mamamaur...@gmail.com wrote: I know some things have changed with scope over the last few versions but not sure what changed when. Local scope for functions was added at some point. Make sure you are scoping all variables and declaring any that need to be with var. Thanks, Maureen. I believe I am explicitly scoping all variables in this case. ~| 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:358974 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
Not sure what you're thinking their Maureen but what he has looks fine, he has nothing that needs var scoping in the function. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Wed, Jul 23, 2014 at 6:51 AM, Maureen mamamaur...@gmail.com wrote: I didn't see scopes on the variables in your return statement. cfreturn queryconvertforgrid(pilots, page, pagesize) / Not sure if that matters, but I would scope them just in case. On Tue, Jul 22, 2014 at 4:47 PM, Stephen Hait stephenh...@gmail.com wrote: On Tue, Jul 22, 2014 at 4:40 PM, Maureen mamamaur...@gmail.com wrote: I know some things have changed with scope over the last few versions but not sure what changed when. Local scope for functions was added at some point. Make sure you are scoping all variables and declaring any that need to be with var. Thanks, Maureen. I believe I am explicitly scoping all variables in this case. ~| 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:358975 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 4:51 PM, Maureen mamamaur...@gmail.com wrote: I didn't see scopes on the variables in your return statement. cfreturn queryconvertforgrid(pilots, page, pagesize) / Not sure if that matters, but I would scope them just in case. I'm not sure how to correctly scope pilots. It's the name of the query but if it try query.pilots or var.pilots the grid doesn't receive any data. I was able to change page and pagesize to arguments.page and arguments.pagesize without causing any noticeable problems but also without resolving the main issue. If you know how I should correctly scope the query name, pilots, let me know and I can see if that makes any difference. Regards, Stephen ~| 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:358976 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
It will be in the variables scope for the query, but as this is an issue with the Ajax sending rather than receiving I doubt that is the issue. Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/113032480415921517411 On Wed, Jul 23, 2014 at 7:02 AM, Stephen Hait stephenh...@gmail.com wrote: On Tue, Jul 22, 2014 at 4:51 PM, Maureen mamamaur...@gmail.com wrote: I didn't see scopes on the variables in your return statement. cfreturn queryconvertforgrid(pilots, page, pagesize) / Not sure if that matters, but I would scope them just in case. I'm not sure how to correctly scope pilots. It's the name of the query but if it try query.pilots or var.pilots the grid doesn't receive any data. I was able to change page and pagesize to arguments.page and arguments.pagesize without causing any noticeable problems but also without resolving the main issue. If you know how I should correctly scope the query name, pilots, let me know and I can see if that makes any difference. Regards, Stephen ~| 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:358977 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFGrid filter stops working after move from CF10 to CF11
On Tue, Jul 22, 2014 at 5:06 PM, Andrew Scott andr...@andyscott.id.au wrote: It will be in the variables scope for the query, but as this is an issue with the Ajax sending rather than receiving I doubt that is the issue. Thanks, Andrew - I confused var variables. And none of that scoping of the return values made any difference. ~| 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:358978 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm