Project Home • Blog • Forums • Wiki • Known Issues • External Project Link • Contact Project
Author: Cutter (All RIAForge projects by this author)
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:
12/4/14 CFQueryReader Update: Support for ExtJS 5 and ColdFusion 11
5/9/12 CFQueryReader v2.1: Now with metaData support
5/8/12 Ext JS 4.1 Grid: Part1: Basic Config
4/26/12 CFQueryReader 2.0: Site and Demo Updates
4/23/12 Ext JS 4 and ColdFusion: CFQueryReader 2.0
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.
ExtJs 2.x, 3.x, or 4.x
To enter issues for this (or any other) project, you must be logged in.
This project hosts its source control at an external location:
Adobe and the Adobe product names are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.