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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%" height="100%"
creationPolicy="all"
creationComplete="init()">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.states.State;
[Bindable] private var stateCollection:ArrayCollection = new ArrayCollection([{"DFFMT":"F0100","DFTEXT":"F0100"},{"DFFMT":"F0200","DFTEXT":"F0200"},{"DFFMT":"F0300","DFTEXT":"F0300"}]);
private function init():void
{
wREACCE.selectedValue = "O";
REREPR.text = "12";
READR1.text = "10 Rue de la pompe";
ddlFormat.selectedIndex = 0;
currentState = stateCollection[0].DFFMT;
}
private function changeFormat(event:Event):void
{
currentState = stateCollection[ddlFormat.selectedIndex].DFFMT;
panelForm.title = stateCollection[ddlFormat.selectedIndex].DFTEXT;
}
]]>
</fx:Script>
<fx:Declarations>
<s:RadioButtonGroup id="wREACCE"/>
</fx:Declarations>
<s:states>
<s:State name = "F0100"/>
<s:State name = "F0200"/>
<s:State name = "F0300"/>
</s:states>
<s:HGroup >
<s:Panel title="State">
<s:List id="ddlFormat" dataProvider="{stateCollection}" borderVisible="false"
labelField="DFTEXT"
width="200"
change="changeFormat(event)"/>
</s:Panel>
<s:Panel id="panelForm">
<mx:Form id="F0100" includeIn="F0100">
<mx:FormItem label="Code">
<mx:TextInput id="REREPR" maxChars="4" width="50"/>
</mx:FormItem>
</mx:Form>
<mx:Form id="F0200" includeIn="F0200">
<mx:FormItem>
<s:RadioButton id="REACCEOui" label="Oui" value="O" groupName="wREACCE"/>
<s:RadioButton id="REACCENon" label="Non" value="N" groupName="wREACCE"/>
</mx:FormItem>
</mx:Form>
<mx:Form id="F0300" includeIn="F0300">
<mx:FormItem label="Adresse 1">
<mx:TextInput id="READR1" maxChars="40" width="300"/>
</mx:FormItem>
</mx:Form>
</s:Panel>
</s:HGroup>
</s:Application> |