Whatever message this page gives is out now! Go check it out!
action = "cfml2wddx|wddx2cfml|cfml2js|wddx2js"
input = "inputdata"
output = "result variable name"
topLevelVariable = "top-level variable name for JavaScript"
useTimeZoneInfo = "yes|no"
validate = "yes|no" >| Attribute | Req/Opt | Default | Description |
action | Required |
| |
input | Required | A value to process. | |
output | Required if action = "wddx2cfml" | Name of variable for output. If action = "WDDX2JS" or "CFML2JS", and this attribute is omitted, result is output in HTML stream. | |
topLevelVariable | Required if action = "wddx2js" or "cfml2js" | Name of top-level JavaScript object created by deserialization. The object is an instance of the WddxRecordset object. | |
useTimeZoneInfo | Optional | yes | Whether to output time-zone information when serializing CFML to WDDX.
|
validate | Optional | no | Applies if action = "wddx2cfml" or "wddx2js".
|
| From | To |
CFML | WDDX |
CFML | JavaScript |
WDDX | CFML |
WDDX | JavaScript |
| The cfwddx tag throws an exception if you attempt to serialize a CFC or user-defined function (UDF). |
<html>
<body>
<!--- Create a simple query. --->
<cfquery name = "q" dataSource = "cfdocexamples">
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>
<!--- Deserialize to a variable named wddxResult. --->
Deserializing WDDX packet...<p>
<cfwddx action = "wddx2cfml" input = #wddxText# output = "qnew">
The recordset data is:...<p>
<cfoutput query = qnew>
#Message_ID# #Thread_ID# #Username#<br>
</cfoutput><p>