Managed Hosting



Project Home Blog Forums Wiki Known Issues External Project Link Contact Project

Author: Cutter (All RIAForge projects by this author)
Last Updated: May 18, 2012 12:04 PM
Version: 2.2
Views: 38,411
Downloads: 2,024
Demo URL: http://cfqueryreader.cutterscrossing.com
License: Apache License, Version 2


Adobe's implementation of JSON return for ColdFusion is great, and frustrating. They use a non-standard JSON return format of query objects in that, instead of the expected name/value pairs, they return first a COLUMNS element, listing the column names only once, and then the DATA array of the record set values. The column names are listed in the order with which the data is listed in each array element. This is great, in the fact that the data packets are much smaller than the traditional return (traditional meaning, that which is returned by most other app servers), but the down side is, it isn't traditional.

John Wilson wrote a custom Data Reader for the Ext JS library, to help with parsing the ColdFusion return. However, although it created records within a Data Store, it didn't handle the column aliasing you are usually capable of when defining fields, nor did it properly cast variables as it should. I finally had a chance to run it through Firebug, and step through the process, at which point I also really had a chance to review the custom extension.

While it worked, it really wasn't using the best tool for the job. The extension extended the Ext.data.DataReader base component. The ColdFusion return basically gives you an Array of records (the DATA), and Ext JS already provides an Ext.data.ArrayReader object that extends the JsonReader. So, after some refactoring and general tinkering, I now release the CFQueryReader custom Ext data reader.

(This build includes an example of using an Ext.Direct API, using DirectCFM to build the data API. It is a very simple example. For more details, see the DirectCFM thread on the Ext Forums: http://extjs.com/forum/showthread.php?t=67983)

Recent Blog Entries:

Last Update:

CFQueryReader has been updated for Ext JS 4.x. A new site now exists, and the project (and download) are hosted on GitHub.

Now containing support for the new metaData options of the reader, for on-the-fly runtime configuration. See the docs for details.


ColdFusion 8+
ExtJs 2.x, 3.x, or 4.x

Issue Tracker:

2 ExtJs 3.0.3 update breaks reader Closed 11/17/09 1:12 PM
1 Column Names in JSON Fixed 11/09/09 2:42 PM

View All Issues

To enter issues for this (or any other) project, you must be logged in.

Source Control Access:

This project hosts its source control at an external location: