User Guide

Using the DataSet component 333
Common workflow for the DataSet component
The typical workflow for the DataSet component is as follows.
To use a DataSet component:
1. Add an instance of the DataSet component to your application and give it an
instance name.
2. Select the Schema tab for the DataSet component and create component properties to
represent the persistent fields of the data set.
3. Load the DataSet component with data from an external data source. (For more
information, see “About loading data into the DataSet component” in Using Flash.)
4. Use the Bindings tab of the Component inspector to bind the data set fields to user
interface components in your application.
The UI controls are notified as records (transfer objects) are selected or modified within
the DataSet component, and updated accordingly. In addition, the DataSet component is
notified of changes made from within a UI control; those changes are tracked by the data
set and can be extracted by means of a delta packet.
5. Call the methods of the DataSet component in your application to manage your data.
Creating an application with the DataSet component
Typically, you use the DataSet component with other user interface components, and often
with a connector component such as XMLConnector or WebServiceConnector. The items in
the data set are populated by means of the connector component or raw ActionScript data,
and then bound to user interface controls (such as List or DataGrid components).
The DataSet component uses functionality in the data binding classes. If you intend to work
with the DataSet component in ActionScript only, without using the Binding and Schema
tabs in the Component inspector to set properties, you’ll need to import the data binding
classes into your FLA file and set required properties in your code. See “Making data binding
classes available at runtime (Flash Professional only)” on page 207.
NOTE
In addition to these steps, you can bind the DataSet component to a connector and a
resolver component to provide a complete solution for accessing, managing, and
updating data from an external data source.