So, as a rule, I refuse to answer questions about ColdFusion UI tags. I definitely blogged about them in the past, but like others, I've come to realize that they cause more problems then they solve. To quote the great one...
CFUI controls are the path to the dark side. CFGIRD leads to CFLAYOUT. CFLAYOUT leads to CFPOD. CFPOD leads to suffering.
However, there are two reasons I'm helping out here. One, the person who wrote me used a bad email address so I couldn't reply directly. Secondly, the issue he ran into is one I've run into myself outside of ColdFusion's UI tags. With that out of the way, let's look at his question.
Is there a character/length limit to the number of arguments/parameters that one can pass into a ColdFusion Grid using the bind attribute?
The reason I ask, I have a search/filter that passes over 56 arguments into a function on a CFC. As soon as I try and add another argument (57th) I get an error on the grid in the AJAX debugger and firebug that states the CFC can no longer be found (http: Error invoking CFC /documentsearch/documentadvancedsearch.cfc : Not Found). I understand that this the standard error when there is an issue.
So yes, indeed, there is a size issue. When making an XHR (Ajax) request, there is an upper limit to the size of the URL you can send. If you pass data via query string parameters, it is definitely possible to hit the limit.This is pretty easy to replicate. I built a simple grid and added an additional bind to a large textarea. (And by size I mean the size of the data inside.) Consider:
<cftextarea name="fieldpoo" value="#repeatString('x ',1999)#" width="400" height="400" />
name="mygrid" format="html" width="400">
Note how the textarea is prepopulated with a huge string. If you run this in your browser you end up with an error:
You can modify that textarea to use a smaller value and suddenly see it start working. So how do you fix this?