![]() | ![]() ![]() ![]() |
![]() | |
![]() | |
![]() |
The Bindings tab allows you to view, add, and remove bindings. All the bindings for a component are displayed here. The Binding List pane, the top pane of the Bindings tab, displays a component's bound properties, represented by their schema location. The Binding Attributes pane, the bottom pane, displays name/value pairs for the selected binding.
When you click the Add Binding (+) button on the Bindings tab, the Add Binding dialog box appears.
This dialog box displays all the schema items for your component. You use this dialog box to select which schema item to bind to. Component properties are displayed as root nodes within the schema tree. An arrow icon represents whether a schema item has read/write access, as follows: a right-pointing arrow represents a write-only property, a left-pointing arrow represents a read-only property, and a bidirectional arrow represents a read-write property.
The schema for a component defines which schema items are bindable. However, you may find a need to bind to a schema item that is not identified in the schema tree. You do this by entering a path expression.
Only the component property names appear in the schema tree when the option is selected.
field [.field]...
where field
is equal to the name of a field (such as addresslist.street
).
XPath
where XPath
is a standard XPath statement (such as addressList/street
).
The Bound To dialog box appears when you click Bound To in the Binding Attributes pane of the Bindings tab. The Bound To dialog box includes the Component Path pane and the Schema Location pane.
The Component Path pane shows a tree of components that have bindable properties. The tree is based on the current Stage editing environment:
Note: Component instances are displayed only if they exist in Frame 1 of the edited document root or in Frame 1 of any screen/clip whose instance exists in the edited document root. This pane shows only components, not text fields.
Note: Bindings to this second component tree are not displayed in the Bound To instances when they are selected. They appear only as bindings from the Bound From component instance.
The Schema Location pane shows the schema tree of the component selected in the Component Path pane.
Note: This is the same information that appears in the Schema Tree pane of the Component Inspector panel's Schema tab.
You can use a dynamic value or a constant value for the Bound To property.
3
, a string, or true
. You can use any value that is valid for the schema item. When you use a constant value, the selected component path, schema location, and path expression are all ignored. You can bind to a constant value only when the Direction attribute for the binding is set to In.When a binding is selected within the binding list, you can further define it using the properties located within the Binding Attributes pane, the bottom pane of the Bindings tab. From here, you can specify additional information, such as Direction, Bound To, Formatter, and so on. The Binding Attributes pane contains several properties that apply to all bindings:
Direction Displays a list of directions that can be set for a binding:
Bound To Identifies the destination schema item (another component's schema item) that this schema item is bound to.
Formatter Displays a list of available formatters that determine how to display this binding. See Schema formatters (Flash Professional only).
Formatter Options Displays the Formatting Options dialog box. The settings in this dialog box are used at runtime to control formatting of data assigned from this schema item to the destination schema item that is defined in the Bound To property. These settings override the default formatting settings for the source schema item.
Index For If you are creating a binding for a schema item that is defined as a field of an object contained within an array, you must specify an index for the array (that is, if the location of the schema item is results.Theaters[].PlayingMovies
, an index must be defined for Theaters[]
). In this situation, a new setting is dynamically added to the Binding Attributes pane.
Note: If a schema item location includes several array references such as "foo/bar[]/abc[]/def[]"
, three index for
settings are dynamically added to the Schema Attributes paneone for each array that needs to be indexed.
index for
setting in the Binding Attributes pane. The Bound Index dialog box appears. This dialog box works in the same way as the Bound To dialog box. See Using the Bound To dialog box.
selectedIndex
property of a DataGrid component) or constant value as an index for your array. If you use a dynamic index value, the binding is reperformed each time the dynamic index value changes.
In this example, the user is selecting the selectedIndex
property of the DataGrid component as the index. Each time the end user selects a new record in the data grid, the index of the array is updated to show the data associated with the new record.
Note: The index for
property appears only in the binding attributes for the schema item that is the field of the object within the array. If you select the Bindings tab for the DataGrid component, the index for
property does not appear in the Binding Attributes pane for the selected index schema item.
Sometimes you might need to manually define a schema that identifies a schema item as a field of an object contained within an array. In the following example, the @id, @billable, @rate, and @duration schema fields are all considered fields of and object contained within the row array:
results : XML datapacket : Object row : Array [n] : object @id : Integer @billable : Boolean @rate : Number @duration : Integer
If a binding is created for any of these items, an index for
'row
' property appears in the Binding Attributes pane, so that an index can be specified for the row array. The authoring environment uses the [n] schema field to identify this type of relationship. Therefore, you may need to duplicate this entry if you are manually creating a schema. To do this, you add a new schema field under the "row : Array" node and set Field Name for the schema field to [n]
. The authoring tool reads this value and create an index for
property if it is used within a binding.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |