User Guide

Advanced topics in data integration 295
To do this, you set the field’s data type to Boolean, which tells the data binding mechanism to
expect Boolean values in that field; and you set the fields encoder to Boolean, which performs the
translation between the underlying string value and the Boolean value that data binding expects
the property to have. See the example in “Using kinds and encoders” on page 292.
The following encoders come with Flash MX Professional 2004:
None The default encoder. No encoding/decoding occurs.
Boolean Converts data of the String type into the ActionScript Boolean type. You must specify
(using the Encoder Options property) one or more strings, separated by commas, that will be
interpreted as
true, and one or more strings that will be interpreted as false. The settings are
case-sensitive.
Date Converts data of the String type into the ActionScript Date type. You must specify (using
the Encoder Options property) a template string, which works as follows:
The template string should contain 0 or 1 instances of "YYYY", "MM", "DD", "HH", "NN", and/
or
"SS", mixed with any other combination of characters.
When converting from date to string, the numeric year, month, date, hour, minutes, and
seconds, respectively, are substituted into the template, in place of YYYY, MM, and so on.
When converting from string to date, the string must exactly match the template, with the
correct number of digits for each of year, month, day, and so on.
DateToNumber Converts a Date object into its numeric equivalent. The DataSet component
uses this encoder for fields that are of the Date type. These values are stored within the DataSet
component as numbers so that they can be sorted correctly.
Number Converts data of the String type into the ActionScript Number type. There are no
authoring settings for this encoder.
DatasetDeltaToXUpdateDelta You use this encoder extracts information from a DeltaPacket
and generates XPath statements that are passed to the XUpdateResolver component to generate
XUpdate statements. It gets the information that is needs to generate the XPath statements from
two places:
The rowNodeKey property, which you must specify with the Encoder Options property
(defined in the third bullet, below).
Within the schema that was used for the XMLConnector component that originally
retrieved the data.
Using this information, the encoder can generate the correct XPath statements needed to identify
your data within the XML file.
The encoder options contain one property:
The rowNodeKey property (String type). In order for an XML file to be updated, the file must
be structured in such a way that the node that represents a record in your data set can be
uniquely identified with an XPath statement. This property combines an XPath statement with
a field parameter to uniquely identify the row node within the XML file and the field within
the data set that makes it unique.