MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 290

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

The schema of a component shows what properties and fields are available for data binding. For
each property or field, there are settings that control validation, formatting, type conversion, and
other features that affect how data binding and the data management components handle
the data of a field. The Schema Attributes pane, the bottom pane of the Schema tab, presents
these settings, which you can view and edit. The following list describes the five categories of
settings, according to the features they control:
Basic settings
the only settings you need to bind to a field:
Name: Every field needs a name.
Data type: Every field has a data type, which is selected from a list of available data types. The
data type of a field affects data binding in two ways: When a new value is assigned to a field
through data binding, the data type determines the rules that are used to check the data for
validity. When you bind between fields that have different data types, the data binding feature
attempts to convert the data appropriately. For more information, see
on page
298.
Storage type: Every field has a storage type. Typically, it defaults to one of four values based on
the data type of a field. The available values for storage types are simple, attribute, array,
or complex.
Note: Developers almost never have to change this setting. However, there are some cases when
the storage type for an attribute contained within the schema for an XML file should be set to
attribute.
Path (optional): This property identifies the location of the data for this schema field. For more
information, see
Validation settings
binding. You usually modify these settings when you want to control the data validation that the
user inputs. To do so, you bind from the UI component to a data component, and then select
appropriate validation settings for the fields of the data component. One common example is
when the user input is bound to the
XMLConnector component or WebServiceConnector component. Another common example is
when UI components are bound to data fields of the DataSet component.
This is how validation works: After any binding is executed, the new data is checked according to
the validation rules of the destination field's data type. A component event is then generated to
signal the results of the checking. If the data is valid, then the valid event is generated; otherwise,
an invalid event is generated. Both components involved in the binding emit the event. You can
ignore these events. If you want anything to happen as a result of these events (such as giving
feedback to the user), you must write some ActionScript code that receives the valid and/or
invalid events.
290
Chapter 14: Data Integration (Flash Professional Only)
Every field or property has these basic schema settings. In many cases, these are
"Virtual schemas" on page 301
Validation settings are applicable to any field that is the destination of a
params
and
"Setting the schema path" on page
property of a connector component, such as the
"Schema data types"
293.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents