Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
SimpleBinding

Package | org.apache.flex.binding
Class | public class SimpleBinding
Inheritance | SimpleBinding Object
Implements | IBead, IDocument

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The SimpleBinding class is lightweight data-binding class that is optimized for simple assignments of one object's property to another object's property.

Public Properties

| Property | Defined By
--- | --- | ---
|  | destination : Object The destination object. | SimpleBinding
|  | destinationPropertyName : String The name of the property on the strand that is set when the source property changes. | SimpleBinding
|  | eventName : String The event name that is dispatched when the source property changes. | SimpleBinding
|  | sourceID : String If not null, the id of the mxml tag who's property is being watched for changes. | SimpleBinding
|  | sourcePropertyName : String If not null, the name of a property on the mxml document that is being watched for changes. | SimpleBinding
|  | strand : IStrand [write-only] The host component for this bead. | SimpleBinding

Protected Properties

| Property | Defined By
--- | --- | ---
|  | document : Object The host mxml document for the source and destination objects. | SimpleBinding
|  | source : IEventDispatcher The source object that dispatches an event when the property changes | SimpleBinding

Public Methods

| Method | Defined By
--- | --- | ---
|  | SimpleBinding() Constructor. | SimpleBinding
|  | setDocument(document:Object, id:String = null):void This method is called to notify an instance of what MXML document it belongs to, if any, and what its assigned id is in that document, if any. | SimpleBinding

Property Detail

destination | property

`public var destination:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The destination object. It is always the same as the strand. SimpleBindings are attached to the strand of the destination object.

destinationPropertyName | property |

`public var destinationPropertyName:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The name of the property on the strand that is set when the source property changes.

document | property |

`protected var document:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The host mxml document for the source and destination objects. The source object is either this document for simple bindings like {foo} where foo is a property on the mxml documnet, or found as document[sourceID] for simple bindings like {someid.someproperty}

eventName | property |

`public var eventName:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The event name that is dispatched when the source property changes.

source | property |

`protected var source:IEventDispatcher`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source object that dispatches an event when the property changes

sourceID | property |

`public var sourceID:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

If not null, the id of the mxml tag who's property is being watched for changes.

sourcePropertyName | property |

`public var sourcePropertyName:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

If not null, the name of a property on the mxml document that is being watched for changes.

strand | property |

`strand:IStrand` [write-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The host component for this bead.

Implementation
`public function set strand(value:IStrand):void`
Constructor Detail

SimpleBinding | () | Constructor

`public function SimpleBinding()`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Constructor.

Method Detail

setDocument | () | method

`public function setDocument(document:Object, id:String = null):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

This method is called to notify an instance of what MXML document it belongs to, if any, and what its assigned id is in that document, if any.

Parameters

| `document:Object` — The MXML document that hosts this component.
| `id:String` (default = `null`)`` — The optional id of the component in the document.

Mon Sep 5 2016, 07:19 AM -07:00