MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guia do Utilizador Página 214

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 256
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 213
214 Use Web Services
5. Save the file, wait until Flex Builder finishes compiling the application, and then click the
Run button in the toolbar to test the application. If you’re using the plug-in configuration
of Flex Builder, select Run > Run As > Flex Application.
A browser opens and runs the application. You find a problem in the applications default
state. The ComboBox reads Top 5 but the DataGrid does not display any information.
The DataGrid should display the top five posts, but it doesnt because your application
hasnt called the web service yet. The application only calls it when the ComboBox
changes. Even if you click Top 5 in the ComboBox after the application starts, the call is
still not made because the selected item hasnt changed.
To fix the problem, you decide to also call the web service immediately after the
application is created, as follows.
6. In Source mode, enter the following creationComplete property (in bold) in the opening
<mx:Application> tag:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="wsBlogAggr.getMostPopularPosts.send()">
Vista de página 213
1 2 ... 209 210 211 212 213 214 215 216 217 218 219 ... 255 256

Comentários a estes Manuais

Sem comentários