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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:view="view.*"
width="1160"
height="560">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var msgs:ArrayCollection
[Bindable]
private var tags:ArrayCollection
private function getMsgs(e:ResultEvent):void{
msgs=e.result.MSGS.MSG;
}
]]>
</mx:Script>
<mx:HTTPService id="xmlFetch" result="getMsgs(event)"
url="http://localhost:8080/Workspace/All_Msgs.xml"/>
<mx:Panel id="windowA" x="312" y="52" width="250" height="200" layout="absolute"
title="Fenetre A" creationComplete="xmlFetch.send()">
<mx:DataGrid
id="MsgGrid"
width="100%" height="100%"
dataProvider="{msgs}"
dragEnabled="true">
<mx:columns>
<mx:DataGridColumn headerText="Message" dataField="MsgName"/>
<mx:DataGridColumn headerText="Status" dataField="MsgStatus"/>
<mx:DataGridColumn headerText="Missing Tag" dataField="NbMisTag"/>
<mx:DataGridColumn headerText="Invalid Format" dataField="NbFormatErr"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:Panel id="windowB" x="598" y="52" width="250" height="200" layout="absolute"
title="Fenetre B">
<mx:DataGrid id="TagGrid" width="100%" height="100%"
dataProvider="{tags}"
dropEnabled="true">
<mx:columns>
<mx:DataGridColumn headerText="Tag" dataField="NAME"/>
<mx:DataGridColumn headerText="Value" dataField="VALUE"/>
<mx:DataGridColumn headerText="Notification" dataField="ERROR"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:Canvas> |
Partager