MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manuale Utente Pagina 90

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 148
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 89
Example 5-4. The XML version of the Flex application
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;
[Bindable]
private var shippingInfo:XMLList;
public function handleXML(event:ResultEvent):void {
shippingInfo = event.result.option as XMLList;
}
public function handleFault(event:FaultEvent):void {
Alert.show(event.fault.faultString, "Error");
}
]]>
</mx:Script>
<mx:HTTPService result="handleXML(event);"
fault="handleFault(event);"
id="xmlRPC" resultFormat="e4x"
method="POST" url="http://examples.adobe.com/flex3app
/flex3samples/
exchangingdata/xml/xmlHttpService.jsp" useProxy="false">
<mx:request xmlns="">
<zipcode>{zipcode.text}</zipcode>
<pounds>{weight_lb.text}</pounds>
</mx:request>
</mx:HTTPService>
<mx:Label x="56" y="32" text="Zip Code" width="55"
height="18" textAlign="right"
fontWeight="bold"/>
<mx:Label x="56" y="58" text="Weight" width="55" height="18"
textAlign="right"
fontWeight="bold"/>
<mx:TextInput x="130" y="32" id="zipcode" width="160"
height="22"/>
<mx:TextInput x="130" y="58" id="weight_lb" width="160"
height="22"/>
74 | Chapter 5:Working with the Server
Vedere la pagina 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 147 148

Commenti su questo manuale

Nessun commento