if(criterionTypes != null){
for(var i:int=0;i<criterionTypes.length;i++){
if(criterionTypes.getItemAt(i)[CriterionConst.CRITERION_TYPE_CODE] == obj[CriterionConst.CRITERION_TYPE_CODE]){
CRITERION_TYPE.selectedIndex = i;
break;
}
}
}
criterionTypes是一个下拉框列表,循环这个列表,取当前循环对象的criterion_type_code与所要修改对象的criterion_type_code对比,如果两者相等,通过criterion_type.selectedIndex将此项设置成选中状态。
for(var i:int=0;i<criterionTypes.length;i++){
if(criterionTypes.getItemAt(i)[CriterionConst.CRITERION_TYPE_CODE] == obj[CriterionConst.CRITERION_TYPE_CODE]){
CRITERION_TYPE.selectedIndex = i;
break;
}
}
}
criterionTypes是一个下拉框列表,循环这个列表,取当前循环对象的criterion_type_code与所要修改对象的criterion_type_code对比,如果两者相等,通过criterion_type.selectedIndex将此项设置成选中状态。