I do a lot of cfdumps with queries, but always forget to use the top attribute introduced in ColdFusion 8. You can use the top attribute to dump just the top x number of records from your query. When dealing with a wide query 500 rows, dumping the first 10 will give me more than enough information to do what I need to do, without waiting for the browser to finish rendering a huge dump table.
3 comments | Posted by Daniel Short on Sep 23, 2009 at 8:33 AM | Categories:
ColdFusion -
I ran into an issue today where passing a cfcatch between methods returned a "not a struct" error. A quick Google search and I found a timely article on HJCotton.net that described it exactly.
4 comments | Posted by Daniel Short on Jul 30, 2009 at 10:04 AM | Categories:
ColdFusion -
ColdFusion rocks, let me just start with that :)
Alright, now that we have that out of the way, I had an issue where I needed to bind a text field to a select menu, but not to the value attribute of that menu. I needed a bunch of other details from that select, and I wanted to prevent a bunch of unnecessary back and forth with the server. So I turned to ColdFusion's binding attributes.
Take the following code:
And it works like a charm. When the select is changed, both the cost and description fields will pick up the custom attributes I added to the select. Now to be 100% standards compliant I'd need to build a custom DTD to include my custom attributes, but 99.9% of the time that's not necessary. Just take a moment and revel in the ease of using ColdFusion to do your dynamic bidding.
0 comments | Posted by Daniel Short on May 7, 2009 at 3:14 PM | Categories:
ColdFusion -