public function resetToBlank(children:Array):void{
if(children.length>0){
for(var i:int=0;i<children.length;i++){
//如果是Container,才递归
if(children[i] is Container){
var container:Container=children[i] as Container;
//DisplayObjectContainer没有getChildren() 方法,Container才有
if(
container.getChildren().length>0){
resetToBlank(container.getChildren());
}
}else{
var component:DisplayObject=children[i] as DisplayObject;
var componentInfo:Object = ObjectUtil.getClassInfo(component);
if(componentInfo.name == "mx.controls::ComboBox"){
component["selectedIndex"]=0;
}else if(componentInfo.name == "mx.controls::TextInput" || componentInfo.name == "mx.controls::DateField"){
if(component.hasOwnProperty("text"))component["text"]="";
}
}
}
}
}