User Guide

cfwddx 359
Usage
ColdFusion preserves the case of column names cases in JavaScript.
The
wddx2js and cfml2js actions create a WddxRecordset javascript object when they encounter
a RecordSet java object. The serialized JavaScript code requires a wddx.js file.
This tag performs the following conversions:
For more information, and a list of the ColdFusion array and structure functions that you can use
to manage XML document objects and functions, see Chapter 31, “Using XML and WDDX,” in
Developing ColdFusion MX Applications.
Example
<!--- This shows basic use of the cfwddx tag. --->
<html>
<body>
<!--- Create a simple query --->
<cfquery name = "q" dataSource = "cfsnippets">
select Message_Id, Thread_id, Username from messages
</cfquery>
The recordset data is:...<p>
<cfoutput query = q>
#Message_ID# #Thread_ID# #Username#<br>
</cfoutput><p>
<!--- Serialize data to WDDX format --->
Serializing CFML data...<p>
<cfwddx action = "cfml2wddx" input = #q# output = "wddxText">
<!--- Display WDDX XML packet --->
Resulting WDDX packet is:
<xmp><cfoutput>#wddxText#</cfoutput></xmp>
useTimeZoneInfo Optional Yes Whether to output time-zone information when
serializing CFML to WDDX.
Yes: the hour-minute offset, represented in
ISO8601 format, is output.
No: the local time is output.
validate Optional No Applies if
action = "wddx2cfml" or "wddx2js".
yes: validates WDDX input with an XML parser
using WDDX DTD. If parser processes input without
error, packet is deserialized. Otherwise, an error is
thrown.
no: no input validation
From To
CFML WDDX
CFML JavaScript
WDDX CFML
WDDX JavaScript
Attribute Req/Opt Default Description