OCT 5 2007

ColdFusion 8: JSONDataSet.loadDataIntoDataSet: invalid flag error

Related Categories: ColdFusion AJAX,

I ran into this bug when integrating a JSON data set call in CF that retrieves database query from a CFC:

Caught exception in JSONDataSet.loadDataIntoDataSet: SyntaxError: invalid flag after regular expression
.

Turns out I had request output debugging turned on in the CF Admin, and the CFC returned debugging at the end of the stream. You have to disable debugging either in the Admin or via in the CFC (or target of the Spry call).

Comments (0) | Print | Send | del.icio.us | Digg It! | Linking Blogs
OCT 5 2007

ColdFusion 8: Bug with cfsprydataset and Spry Paged Views

Related Categories: ColdFusion AJAX,

So I'm playing with cfsprydataset and some existing Spry code I had that uses Spry Paged Views. Turns out the Spry.Data.PagedView() cannot bind to dataset created by cfsprydataset. The workaround that I have found is to manually create a Spry dataset with the same name and type used in the cfsprydataset call. This allows the local Spry.Data.PagedView() to bind to the local dataset.

<cfsprydataset bind="url:datapump.cfc?queryFormat=column&method=getArtists" name="dsArtists" type="json" options="{path: 'DATA', pathIsObjectOfArrays: true}" />
<script type="text/javascript" src="/CFIDE/scripts/ajax/spry/includes/SpryPagedView.js"></script>
<script type="text/javascript">
    //Spry.Data.Region.debug = true;
    var dsArtists = new Spry.Data.JSONDataSet("datapump.cfc?queryFormat=column&method=getArtists", {path: 'DATA', pathIsObjectOfArrays: true});
    var pvArtists = new Spry.Data.PagedView(dsArtists, {pageSize: 5});
    
    var pageOffset = 0;
    var pageSize = 5;
    var pageStop = pageOffset + pageSize;
    
</script>

Oddly enough there's only one AJAX call and dataset retrieved. I've attached some code samples that run against the CF8 example database. I've also sent this to the Spry team to see if I'm missing something.

Update: I filed bug 70562 for this issue.

Comments (5) | Print | Send | Download | del.icio.us | Digg It! | Linking Blogs
AUG 15 2007

ColdFusion 8: CF AJAX Logger Ignores CFSETTING

Related Categories: ColdFusion AJAX,

Calling <cfsetting showdebugoutput="false"> does not disable the ColdFusion AJAX Logger if it is enabled. You enable the ColdFusion AJAX Logger in the CF Admin Debug Output Settings screen and invoke it by appending "cfdebug" to the URL (e.g. http://localhost:8500/myAJAXpage.cfm?cfdebug). Ray Camden brought this to my attention and I filed bug 70324.

Comments (0) | Print | Send | del.icio.us | Digg It! | Linking Blogs
Welcome to Sarge's personal blog A green acorn

Previous Month September 2010 Next Month

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Subscribe
Enter your email address to subscribe to this blog.