
1088
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Las
t
upda
te
d 8/5/2010
Time zone processing
Producers and consumers of WDDX packets can be in geographically dispersed locations. Therefore, it is important
to use time zone information when serializing and deserializing data, to ensure that date-time values are represented
correctly.
The
cfwddx action=cfml2wddx
tag
useTimezoneInfo
attribute specifies whether to use time zone information in
serializing the date-time data. In the JavaScript implementation,
useTimezoneInfo
is a property of the
WddxSerializer
object. In both cases, the default
useTimezoneInfo
value is
True
.
Date-time values in WDDX are represented using a subset of the ISO8601 format. Time zone information is
represented as an hour/minute offset from universal time (UTC); for example, “2002-9-8T12:6:26-4:0”.
When the
cfwddx
tag deserializes WDDX to CFML, it automatically uses available time zone information, and
converts date-time values to local time. In this way, you need not worry about the details of time zone conversions.
However, when the JavaScript objects supplied with ColdFusion deserialize WDDX to JavaScript expressions, they do
not use time zone information, because in JavaScript it is difficult to determine the time zone of the browser.
Using WDDX
ColdFusion provides several tools for creating and converting WDDX that you can use for common application uses.
Using the cfwddx tag
The tag can do the following conversions:
A typical
cfwddx
tag used to convert a CFML query object to WDDX looks like the following:
<cfwddx action="cfml2wddx" input="#MyQueryObject#" output="WddxTextVariable">
In this example, MyQueryObject is the name of the query object variable, and WddxTextVariable is the name of the
variable in which to store the resulting WDDX XML.
Note:
For more information on the
cfwddx
tag, see the CFML Reference.
struct
Structure
N/A
java.lang.
Hashtable
Object
IWDDXStruct
recordset
Query object
N/A
coldfusion.runtime.
QueryTable
WddxRecordset
IWDDXRecordset
binary
Binary
binary
byte[]
WddxBinary
V_ARRAY | UI1
From
To
CFML
WDDX
CFML
JavaScript
WDDX
CFML
WDDX
JavaScript
WDDX
CFML
XML
Schema
Java
ECMAScript/
JavaScript
COM
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...