MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Manual do Utilizador Página 48

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 124
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 123 124

Comentários a estes Manuais

Sem comentários