
348
Chapter 18 Interacting with Remote Servers
In the CFML implementation,
useTimezoneInfo
is an attribute of the
cfwddx
action=cfml2wddx
tag. In the JavaScript implementation,
useTimezoneInfo
(note
the case sensitivity of JavaScript) is a property of the
WddxSerializer
object.
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 UTC; for
example, “1998-9-8T12:6:26-4:0”.
During WDDX deserialization to CFML, time zone information is automatically
taken into account and all date-time values are converted to local time. In this way,
UTC is taken out of the picture entirely and you do not need to worry about the
details of time zone conversions.
However, during deserialization to JavaScript expressions, time zone information is
not taken into account. Complications arise because of the difficulty of determining
the time zone of the browser.
How WDDX works
The WDDX vocabulary describes a data object with a high level of abstraction. For
instance, a simple structure with two string variables might have the following form
after it is serialized into a WDDX XML representation:
<var name=’x’>
<struct>
<var name=’a’>
<string>Property a</string>
</var>
<var name=’b’>
<string>Property b</string>
</var>
</struct>
</var>
When the WDDX Deserializer object deserializes this XML, it creates a structure that
is also created by either of the following scripts:
The
WddxSerializer
and
WddxDeserializer
objects are defined in the file CFIDE/
scripts/wddx.js. For detailed information on these JavaScript objects, see the CFML
Reference.
JavaScript
CFScript
x = new Object();
x.a = "Property a";
x.b = "Property b";
x = structNew();
x.a = "Property a";
x.b = "Property b";
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...