Vinculação de dados do coldfusion para o flex
In this tutorial, you will learn how to use DataGrid and PieChart controls and bind them to the data returned from a ColdFusion Component (CFC) function. You will also learn how to synchronize the data in the two controls.
This tutorial is intended for: * Developers who are exploring tutorials in the Flex and ColdFusion mini learning center that are based on the Fictitious Sales Planner example * Experienced ColdFusion developers without previous Adobe Flex framework or Adobe Flash Builder 4 experience * ColdFusion developers who are familiar with ColdFusion components
Configuring the data return type
As mentioned in the introduction, this tutorial uses the same development environment as Getting started with ColdFusion and Flash Builder 4 and the other tutorials in this series. In this section, you will name a second data type for use with a different service call to a CFC function: 1. Locate the Data/Services view in Flash Builder 4. You should see the F4CF_Getting_Started_Service service shown in Figure 1.
Figure 1. Verify whether the EmployeeSalesData data type has been defined. 2. In the Data/Services view, right-click the getEmployeeDataByRegion() function of the F4CF_Getting_Started_Service service and select Configure Return Type (see Figure 2).
Figure 2. Configure the return type of a CFC method.
Each record from the query will be placed in an ActionScript object with each column of data (FIRSTNAME, LASTNAME, EMAIL, and so on) set in a name/value pair. Each record is indexed starting