127
CHAPTER 6
Working with Data
You can use Macromedia Flex Builder to bind Flex components, Flex data models, or Flex data
services in order to pass data between them, or between the user interface and the back-end
system.
This chapter covers the following topics:
•
“Binding a control or container” on page 127
•
“Editing a binding visually” on page 129
•
“Working with Flex data models” on page 129
•
“Working with Flex data services” on page 136
Related topics
•
“Tutorial: Binding components to data with Flex Builder” on page 58
Binding a control or container
After inserting the components that make up your user interface, (see
Chapter 4, “Building a Flex
User Interface Visually,” on page 95
), you can use Flex Builder to visually bind them together. For
more information on data binding, see
“Data binding in Flex” on page 150
.
If you want to bind a component to a data model, see
“Working with Flex data models”
on page 129
.
If you want to bind a component to a web service, an HTTP service, or a Java object, see
“Working with Flex data services” on page 136
.
To bind a control or container:
1.
Make sure your MXML file contains one component to supply the data and one component to
accept the data.
For example, your file can have a TextInput component to let users enter a value and a Label
component to display the value entered in the TextInput component.
2.
In Design view, select the component that will supply the data.
For example, select the TextInput component if you want it to supply the data to the Label
component.
You can also click anywhere in the component tag in Code view to select it.
Summary of Contents for FLEX BUILDER-USING FLEX BUILDER
Page 1: ...Using Flex Builder...
Page 116: ...116 Chapter 4 Building a Flex User Interface Visually...
Page 144: ...144 Chapter 6 Working with Data...
Page 154: ...154 Appendix A Basic Flex Concepts...