1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
<mx:Script>
<![CDATA[
import mx.controls.List;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
private function DoCall2():void{
ro.ProcessInstanceWhenSubmit();
}
private function onResult2(event : ResultEvent):void{
datagrid.dataProvider = event.result as ArrayCollection
}
private function onFault2(event : FaultEvent):void{
// Afficher le message d'erreur
tareponse.text = event.fault.message;
}
]]>
</mx:Script>
<mx:RemoteObject id="ro" destination="programmeDAO" result="onResult2(event)" fault ="onFault2(event)"/>
<mx:Button label="Button2" id="b2" click="DoCall2()"/>
<mxataGrid width="300" height="149" id="datagrid">
</mxataGrid>
<mx:TextArea x="80" y="223" id="tareponse" width="410" height="110"/> |