Copy link to clipboard
Copied
I have the following code:
Pete, while we await your reply to bkbk's helpful question, did you happen to go to July's update 15 from an update earlier than May's update 14? If so, it's possible this is about a change that came with THAT update, which you now have (with 15). And this applies to this on cf2025 and 2021 as well.
The change from
May requires that all incoming args passed to a remote cfc method must be defined as args in that method. I realize I may be speaking Greek to you, a non-developer. 🙂
Some "good
...@conners40482221 , to settle matters definitively, I decided to recreate your entire scenario. In doing so, I quickly found the reason why the grid was not displaying anything. The grid code contains the following redundant line
<cfoutput query="getanilist">
That would have resulted in an error. Hence the grid would not have been displayed.
I shall now provide a 100% simulation of your scenario. If you run it you will see that the grid is displayed.
<cfscript>
// Create the initial query
...
Copy link to clipboard
Copied
You should not be using cfgrid in a recent ColdFusion version. For some years now, the general advice in the ColdFusion community is to stop using ColdFusion's User Interface tags, of which cfgrid is one.
See, for example,
https://stackoverflow.com/questions/22635588/what-issues-coldfusion-ui-tags-have
Some of the UI tags, such as cfgrid, are no longer actively developed by Adobe's engineers. Other ColdFusion UI tags have been deprecated. Even if a UI tag works today, there is a chance it wont work tomorrow. It is therefore not a good idea to use cfgrid or any other UI tag in a recent ColdFusion version.
The solution is to use an alternative for ColdFusion UI tags. See, for example,
https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way
You could of course cook up your own solution, using JQuery or HTML 5, with CSS Grid Layout or Flex Box, for example. In fact, you could just ask ChatGPT to tell you how to use any of these to generate a grid.
Copy link to clipboard
Copied
Hi! Thanks for the help. I tried using the github and datatables to recreate what I had, but the problem is I can't figure out how to make it editable. I went down a rabbit hole using data tables "editor" but seems to be a paid subscription thing? Was wondering if you knew any way to make the table editable. Thanks!
Copy link to clipboard
Copied
According to Adobe, CFGrid was "retired" in CF2018. Check out DataTablesJS. It's super easy and customizable.
Copy link to clipboard
Copied
Hi! Thanks for the help. I tried using datatables to recreate what I had, but the problem is I can't figure out how to make it editable. I went down a rabbit hole using data tables "editor" but seems to be a paid subscription thing? Was wondering if you knew any way to make the table editable. Thanks!
Copy link to clipboard
Copied
I have not used DataTables for editting, sorry. I'm no help there.
I might suggest you look at DHTMLX Spreadsheet. I have not used their spreadsheet product, but I have used some of their other products and they are excellent.
Copy link to clipboard
Copied
Greetings,
I had the same issue with cfgrid and other CF UI. If you have complete access to CF installation, you can replace some content on you new CF with content from the old CF (the same diectories) that had no issues with cfgrid. The following worked for me:
Under your application CF instance ..wwwroot\cf_scripts\scripts\ajax
1. Replace content of new ext directory with old ext directory.
2. Add yui directory (new CF doesn't have it).
Under your application CF instance ..wwwroot\cf_scripts\scripts\ajax\package
1. Replace new cfgrid.js with old cfgrid.js
Under your application CF instance ..wwwroot\cf_scripts\scripts\ajax\resources
1. Replace content of new ext folder with old ext folder
2. Add yui folder
I hope that works for you. Important to know that every CF update may cause you to make those changes again.
It is very strange that CF Adobe team didn't fix number of UI issues tha were working nicely in CF11, but completelly unusable in newer CF versions. Yes, you can use UI from the available third party tools but it makes CF programmers life much harder if you need to look at other people CF code and also watch for those third party tools updates.
Regards,
Simon
Copy link to clipboard
Copied
hello,
I'm not a developer - I am a sys admin - however, my developer came to me with an issue with a call they make using cfgrid - which since update 15 is not working. I tried the suggestion from Simon above and still no luck
Copy link to clipboard
Copied
Hi @Pete220652393l9r , I am assuming you are on ColdFusion 2023. Is that so?
In any case, please share with the forum what you mean by "not working". For instance, is there an error? If there is, please share:
Copy link to clipboard
Copied
Pete, while we await your reply to bkbk's helpful question, did you happen to go to July's update 15 from an update earlier than May's update 14? If so, it's possible this is about a change that came with THAT update, which you now have (with 15). And this applies to this on cf2025 and 2021 as well.
The change from
May requires that all incoming args passed to a remote cfc method must be defined as args in that method. I realize I may be speaking Greek to you, a non-developer. 🙂
Some "good news" is that Adobe also offered a fail-safe mechanism--which REVERTS that change of behavior (for better or worse), as a simple jvm arg that could be added to cf (within the cf admin or jvm.config file).
-Dcoldfusion.runtime.remotemethod.matchArguments=false
(Adding such a jvm arg must be done very carefully--if you make a mistake, cf won't start.)
This workaround is not the best ultimate solution; it's undoing a security protection. But it buys you time to implement the best solution, which would be to have a developer modify the remote cfc method (being called by the cfgrid) to define the args being passed in. There are ways to diagnose that, but I realize it's beyond your responsibility and your need of a ready solution.
And even this reply is just a guess on my part that this is the problem and solution, but it fits in that it started with the July update and if you had not yet applied the May update.
Let us know what you think or how it goes.
Copy link to clipboard
Copied
Thnaks charlie -
so mainly, it looks the table loads, column heads, but no data is pulled - let me get with my developer and I will update the post -
thank you
Copy link to clipboard
Copied
@Pete220652393l9r , is it ColdFusion 2023?
Copy link to clipboard
Copied
Pete, are you saying that's a change if you DO add the jvm arg to cf? Or are you simply elaborating on what's happening but you've not yet tried the change?
To be clear, my suggestion was one that I meant you should implement AND THEN rest the result and report to us.
But since adding such a jvm arg requires restarting cf, maybe that's why you want to coordinate with the developer. But to be clear, if this was a dev or staging env, my hope was that you may have freedom to try such a change and cf restart, then test, then revert the change (all in a matter of minutes) to let us know if it "fixed" the problem.
If it did, THEN you'd really want to get together with the developer to discuss the problem, both how the recent cf updates brought this change, how that arg is one workaround, but how modifying the code to accommodate the change is best.
You can read more about the issue in Adobe's update technotes from May (for your cf version) or my blog post on that.
But again my first question (for you, not the developer) was simply asking whether you had recently applied either the July or May cf update, which introduced this change regarding remote method invocation, which your cfgrid is likely leveraging (and now tripping over). If so, that's what motivates you trying this step above.
Copy link to clipboard
Copied
sorry Charlie for not being clear- i was describing the original issue.
I have the parameter in on the JVM now and it seems to be working - thank you -
Copy link to clipboard
Copied
Oh, great. So you're confirming that adding the jvm arg has worked (for now)? If so, could you mark as "the answer" my original reply proposing this arg?
Then, for your sake, are you and your developer digging deeper to find and resolve the root cause problem in that cfc remote method being called, due to the change introduced by that May update? See the links I've offered, for more. As always, just trying to help.
Copy link to clipboard
Copied
@Charlie Arehart , If you have answered @Pete220652393l9r's question, then that's great. However, I don't think it is proper for him to mark your answer as the correct answer to this thread. That is because there is nothing to suggest that @Pete220652393l9r's issue is the same as that of the original poster.
It is sufficient for @Pete220652393l9r to describe how your suggestion solved his problem. Which is just as commendable, without raising any questions about propriety.
Copy link to clipboard
Copied
Charlie, thank you so much for this -- if I could mark your reply as the answer, I would! This was EXACTLY what I needed after the CF2021 upgrade from update 17 to 21.
Copy link to clipboard
Copied
Great to hear, @Dynamic_critic9200. Thanks for the shout out.
As for marking it as an answer, well, as bkbk noted in July there's a technicality in that what I offered (then) would not be "the answer" for the ORIGINAL post above (from Apr 2024)--since that was well before the updates and jvm arg I was referring to.
It's too bad, in that people (like you) who somehow find this post would have to read through all those other replies first before getting to mine from July about the jvm arg. FWIW, it's ok for more than one reply to e marked as an answer.
So @BKBK, now that this has come up again, would you object to us (you or me) picking one or more of the original replies from 2024 to be answers, and then also mine from July? (now that it's solved things for two people who've written here, and perhaps others who have not)
As always, just trying to help, not seeking to "earn points".
Copy link to clipboard
Copied
@conners40482221 , to settle matters definitively, I decided to recreate your entire scenario. In doing so, I quickly found the reason why the grid was not displaying anything. The grid code contains the following redundant line
<cfoutput query="getanilist">
That would have resulted in an error. Hence the grid would not have been displayed.
I shall now provide a 100% simulation of your scenario. If you run it you will see that the grid is displayed.
<cfscript>
// Create the initial query,"getanilist", with column names and data types
getanilist = queryNew("ANIID, ANINameID, PhoneNo, Carrier, CSR, SS, CP, Hunt, Response, LineTypeFeat, CustomerUse, AniDate, Cost",
"varchar, integer, varchar, varchar, varchar, varchar, varchar, varchar, varchar, varchar, varchar, date, decimal");
// Add the first row of data
queryAddRow(getanilist, {
ANIID: "12345",
ANINameID: 101,
PhoneNo: "+1-555-123-4567",
Carrier: "AT&T",
CSR: "Jane Doe",
SS: "Active",
CP: "Enabled",
Hunt: "Default",
Response: "Success",
LineTypeFeat: "VoIP",
CustomerUse: "Support",
AniDate: createDate(2025, 9, 4),
Cost: 15.75
});
// Add a second row of data
queryAddRow(getanilist, {
ANIID: "67890",
ANINameID: 102,
PhoneNo: "+1-555-987-6543",
Carrier: "Verizon",
CSR: "John Smith",
SS: "Inactive",
CP: "Disabled",
Hunt: "Overflow",
Response: "Timeout",
LineTypeFeat: "PSTN",
CustomerUse: "Sales",
AniDate: createDate(2025, 8, 20),
Cost: 20.50
});
// Add a third row of data
queryAddRow(getanilist, {
ANIID: "11223",
ANINameID: 103,
PhoneNo: "+1-555-111-2222",
Carrier: "T-Mobile",
CSR: "Lisa Jones",
SS: "Active",
CP: "Enabled",
Hunt: "Default",
Response: "Success",
LineTypeFeat: "VoIP",
CustomerUse: "Marketing",
AniDate: createDate(2025, 7, 15),
Cost: 18.25
});
// Output the query to verify its contents
// writeDump(getanilist);
</cfscript>
<!--- Set the client ID --->
<cfset clientID=1234>
<!--- Display the grid --->
<cfform action="updateinfodone.cfm?needsupdate=ANILIST&clientid=#clientid#" method="POST">
<cfgrid name="grid3" query="getanilist" selectmode="EDIT" delete="Yes" deletebutton="Delete Row" width="690" height="400" format="html">
<cfgridcolumn name="ANIID" display="no">
<cfgridcolumn name="ANINameID" display="no">
<cfgridcolumn name="PhoneNo" header="Phone" headeralign="CENTER">
<cfgridcolumn name="Carrier" header="LEC" headeralign="CENTER">
<cfgridcolumn name="CSR" header="CSR" headeralign="CENTER">
<cfgridcolumn name="SS" header="SS" headeralign="CENTER">
<cfgridcolumn name="CP" header="BTN" headeralign="CENTER">
<cfgridcolumn name="Hunt" header="Hunt" headeralign="CENTER">
<cfgridcolumn name="Response" header="IssueNo" headeralign="CENTER">
<cfgridcolumn name="LineTypeFeat" header="Ln Type/Feat" headeralign="CENTER">
<cfgridcolumn name="CustomerUse" header="Customer Use - - - - " headeralign="CENTER">
<cfgridcolumn name="AniDate" header="LD Carrier" headeralign="CENTER">
<cfgridcolumn name="Cost" header="Cost" headeralign="CENTER" numberformat="_____.__">
</cfgrid>
</cfform>
The output:
Copy link to clipboard
Copied
@Charlie Arehart , in response to your question, I have duly taken action.
Copy link to clipboard
Copied
Good catch on Conner's original 2024 issue. (To be clear to readers, that "settles" only his issue, not the others raised subsequently here.) Would be nice to hear back from him, but it seems reasonable that you've presumed it will be the answer for him.
And thanks also for marking my reply to the more recent (2025) matters here as another "answer".
Find more inspiration, events, and resources on the new Adobe Community
Explore Now