flex form formitem

form.formite 遍历

mxml:
<mx:Form id="myform">
   <mx:FormItem label="id">
       <mx:TextInput/>
   </mx:FormItem>
   <mx:FormItem label="name">
       <mx:TextInput/>
   </mx:FormItem>
   <mx:FormItem label="des">
       <mx:TextInput/>
   </mx:FormItem>
</mx:Form>


as:
var items:Array=myform.getChildren()
for(var i=0;i<items.length;i++){
    if(items[i] is FormItem){
        var _items:Array=items[i].getChildren()
        for(var j=0;j<_items.length;j++){
            trace(_items[j].text)
        }
    }
}

你可能感兴趣的:(java,Flex,J#)