`
lujiawu12
  • 浏览: 124661 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

flex的下拉框过滤(arraycollection)

阅读更多
	//定义要过滤的字符
			public var filtStr:String;
			 private function toggleFilter(event:Event):void {
 			if (event.currentTarget.text!="") {
 				filtStr=event.currentTarget.text;
 				ac.filterFunction = processFilter;
 			} else {
 				ac.filterFunction = null;
 			}
 				ac.refresh();
 			}

 			private function processFilter(item:Object):Boolean {
 				//regex   parseFloat(item.name) == 0;
			 return ((String)(item.data)).indexOf(filtStr)==0;
 			}
            //查询 用json封装查询条件 			
			private function remotingQuery():void{
				var jsonObject:Object=new Object();
				jsonObject.name="hangzhou";
				jsonObject.value="杭州";
				jsonObject.fromTime="2008-10-10";
				jsonObject.toTime="2008-11-11";
				var dataString = JSON.encode(jsonObject);  
			}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics