MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manuale Utente Pagina 140

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 184
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 139
140 Data Services
Migrating HTTPService components
This section describes how to migrate your HTTPService from Flex 1.5 to Flex 2.0 syntax.
For HTTPService tags, you specify the URL of the service in the
url property of the tag.
The following examples shows and HTTPService tag that contacts a service directly:
...
<mx:HTTPService
id="yahoo_web_search"
url="http://api.search.yahoo.com/WebSearchService/V1/webSearch"
/>
...
You now configure HTTP services in the <proxy-service> section of the services-config.xml
file or a file that it includes by reference. Adobe generally defines the Proxy Service in the
proxy-config.xml file, which is included by reference in the services-config.xml file.
Previously, it was configured in the
<http-service-proxy> section of the flex-config.xml
file.
To bind service results in Flex 2, you use the
lastResult property of the service as the
binding source, as the following example shows:
<mx:Text text="{yahoo_web_search.lastResult}"/>
In Flex 1.5, the result property was the binding source.
Unnamed HTTPService
This section describes how to migrate your unnamed HTTPService tags from Flex 1.5 to
Flex 2.
For unnamed HTTPService tags that set
useProxy="false", the default value, you are not
required to make any changes. These tags already ignore all server-side configuration.
Vedere la pagina 139
1 2 ... 135 136 137 138 139 140 141 142 143 144 145 ... 183 184

Commenti su questo manuale

Nessun commento