142
Chapter 6: Working with Data
To create an event handler to call a data service:
1.
Make sure your MXML file contains a binding to a data service such as an web service, an
HTTP service, or a remote object.
The binding must appear in the Bindings panel (Window > Bindings). For more information,
see
“Working with Flex data services” on page 136
.
2.
In Flex Builder, select the component that will generate the event to invoke the data service.
For example, you can select a Button component for users to click.
3.
In the Events panel of the Tag Inspector (Window > Tag Inspector), click the field next to the
event that will trigger the service call.
A lightning bolt icon appears next to the field.
4.
Click the lightning bolt icon.
The Select Source for send() dialog box appears.
5.
Specify the data service to invoke.
For example, if you want to invoke a weather-related web service, select the web service in the
left pane (you must define the web service in the Data panel first) and then select the operation
to invoke in the right pane.
6.
Click OK to create the event handler.
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...