When it comes to queries and JSON, CF supports two forms. See the
SerializeJSON function for more info. When you just use Spry (I mean
on the client, no CF8 Ajax stuff), you can specify the type hen you
create the data set. For an example, see Lighthouse Pro
(lighthousepro.riaforge.org).
On Wed, Apr 9, 2008 at 2:50 PM, Chad Gray <[EMAIL PROTECTED]> wrote:
> What is up with this?
>
>
> If I use <cfsprydataset> to get the json data, the data starts off with ]
> {"COLUMNS":["DEPT",.... etc.
>
> If I use javascript to get the data ie. var mydata = new
> Spry.Data.JSONDataSet
> The page works and the json data starts with "ROWCOUNT".
> {"ROWCOUNT":3,"COLUMNS":["DEPT",.... etc.
>
> Why no ROWCOUNT when using cfsprydataset?
>
> <cfsprydataset name="mydata2" type="json" bind="cfc:jobNotes.getSteps()">
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Chad Gray [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 09, 2008 2:56 PM
> To: CF-Talk
> Subject: spry and cf
>
> I am about to pull my hair out. What am I doing wrong? The page returns
> with no errors and the table is empty of data. All I have on the page is the
> table headers and no table rows after it.
>
> Firebug says I am returning data:
>
>
> {"COLUMNS":["JOBNUM","EMPLOYEENUM"],"DATA":[[1049,3010],[1049,3160],[1049,3170],[1049,3170],[1049,3170
>
> ],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049
>
> ,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170],[1049,3170]]}
>
> <script type="text/javascript" src="SpryAssets/xpath.js"></script>
> <script type="text/javascript" src="SpryAssets/SpryData.js"></script>
> <script type="text/javascript" src="SpryAssets/SpryJSONDataSet.js"></script>
>
> <cfsprydataset name="mydata2" type="json" bind="cfc:jobNotes.getSteps()">
>
> <div spry:region="mydata2">
> <table width="100%" border="1">
> <tr>
> <th>Job Num</th>
> <th>Employee Num</th>
> </tr>
> <tr spry:repeat="mydata2" >
> <td>{mydata2::JOBNUM}</td>
> <td>{mydata2::EMPLOYEENUM}</td>
> </tr>
> </table>
> </div>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303077
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4