OCT
5
2007
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