<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:form="com.renaun.containers.*" layout="vertical" viewSourceURL="srcview/index.html"
initialize="Logger.enabled = true">
<mx:Script>
<![CDATA[
[Bindable]
public var prefix: Array = [ {label:"Mr.", data:1},
{label:"Mrs.", data:2}, {label:"Ms.", data:3} ];
]]>
</mx:Script>
<form:AdvancedForm id="myForm" undoHistorySize="5">
<mx:FormItem>
<mx:ComboBox id="titles" dataProvider="{ prefix }" selectedIndex="0" />
</mx:FormItem>
<mx:FormItem label="First and Last Names" required="true">
<mx:TextInput id="firstName" />
<mx:TextInput id="lastName" />
</mx:FormItem>
<mx:FormItem label="Department">
<mx:TextInput id="dept" text="Biology" />
</mx:FormItem>
<mx:FormItem label="Other">
<mx:NumericStepper id="age" value="25" minimum="1" maximum="100" stepSize="1" />
<mx:CheckBox id="like" label="Do you like this code?" selected="true" />
<mx:RadioButtonGroup id="survey"/>
<mx:RadioButton id="rd1" groupName="survey" label="It is Okay" selected="true" />
<mx:RadioButton id="rd2" groupName="survey" label="Normal" />
<mx:RadioButton id="rd3" groupName="survey" label="It can use some work" />
</mx:FormItem>
</form:AdvancedForm>
<mx:Validator id="vldrFirstName" source="{ firstName }" property="text"
required="true" />
<mx:Validator id="vldrLastName" source="{ lastName }" property="text"
required="true" />
<mx:HBox>
<mx:Button click="mx.controls.Alert.show( 'Submit Data', 'Alert' )"
label="Submit Data" enabled="{ myForm.isValid }" />
<mx:Button click="myForm.resetForm()" label="Reset Form" />
</mx:HBox>
</mx:Application>