[Bindable] Metadata Tag
Flex Binding is a very powerful feature that enables objects and their properties to be bound together.
[Bindable] is a Metadata tag that declares that an object or property can be the source of binding. As the source of a binding an object will dispatch an event (PropertyChangeEvent) when a watched property's value changes.
[Bindable] Example
A bindable property (such as firstName in the below example) will dispatch an event
when its value changes.
[Bindable] public var firstName:String;
You can also make an entire class Bindable. Adding [Bindable] above a class declaration makes all the public properties of the class bindable.
[Bindable] class Contact { // both properties are bindable because the class is tagged bindable public var firstName:String; public var lastName:String; ... }
Custom Binding Events
By default a bindable property will trigger (dispatch) a PropertyChangeEvent
named propertyChange.
The [Bindable] tag can also be parameterized with custom event names.
This is done by adding a name argument to the Bindable tag:
[Bindable(name="customeEventName")].
The below example tags both the firstName and lastName properties
to be bindable using a custom event name "nameChange".
[Bindable(name="nameChange")] public var firstName:String; [Bindable(name="nameChange")] public var lastName:String; [Bindable("nameChange")] public function get fullName():String { return this.firstName + " " + this.lastName; }
Because firstName, lastName, and fullName are all bindable
with the "nameChange" event the change of any one will trigger the appropriate
bindable events.
So, bindings watching the fullName property will be triggered when the
firstName and/or lastName property values are set.
See Binding and Events for more information...
If you view the source of common components we use in MXML you'll see that many of their properties are tagged [Bindable].

