如何验证<mx:list component =“”>?</mx:list>

时间:2009-12-26 12:15:39

标签: flex

如何验证是否从列表中选择了至少一个项目,以便在应用程序的init()处将 selectedIndices 设置为NULL?

1 个答案:

答案 0 :(得分:1)

以下代码可以帮助想要验证我想要的列表的人:

<mx:NumberValidator 
         id               ="myListValidator"
         trigger          ="{myButton}" 
         triggerEvent     ="click"  
         minValue         ="0"
         lowerThanMinError="Should I write an application to you for selecting atleast one of the option X-(" 
         source           ="{myList}" 
         property         ="selectedIndex"
 />