MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Instrukcja Użytkownika Strona 48

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 124
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 47
TUTORIALS POINT
Simply Easy Learning Page 43
Flex Data Binding
This chapter describes the Data Binding concepts.
What is Data Binding?
D
ata Binding is a process in which data of one object is tied to another object. Data binding requires a
source property, a destination property and a triggering event which indicates when to copy the data from source to
destination.
Flex provides three ways to do Data Binding
Curly brace syntax in MXML Script ({})
<fx:binding> tag in MXML
BindingUtils in ActionScript
Data Binding - Using Curly Braces in MXML
Following example demonstrates using curly braces to specify data binding of a source to destination.
<s:TextInput id="txtInput1"/>
<s:TextInput id="txtInput2" text = "{txtInput1.text}"/>
Data Binding - Using <fx:Binding> tag in MXML
Following example demonstrates using <fx:Binding> tag to specify data binding of a source to destination.
<fx:Binding source="txtInput1.text" destination="txtInput2.text" />
<s:TextInput id="txtInput1"/>
<s:TextInput id="txtInput2"/>
Data Binding - Using BindingUtils in ActionScript
Following example demonstrates using BindingUtils to specify data binding of a source to destination.
CHAPTER
9
Przeglądanie stron 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 123 124

Komentarze do niniejszej Instrukcji

Brak uwag