flex List使用2
来源:互联网 发布:老马说编程 编辑:程序博客网 时间:2024/05/02 00:15
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="450" height="220">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]public var titleName:String;//标题
[Bindable]public var canChooseList:ArrayCollection=new ArrayCollection();
[Bindable]public var chosenList:ArrayCollection=new ArrayCollection();
private function doChoose():void{
if(leftList.selectedItem){
chosenList.removeAll();
chosenList.addItem(leftList.selectedItem);
}else{
Alert.show("请先选择一个处理人!","提示");
}
}
private function unChoose():void{
chosenList.removeAll();
}
public function validate():Boolean{
var result:Boolean=false;
if(chosenList!=null&&chosenList.length>0){
result=true;
}
return result;
}
private function filteHandler():void{
var txt:String=chooseUser.text;
if(txt==null||txt==""){
leftList.dataProvider=canChooseList;
}else{
var temp:ArrayCollection=new ArrayCollection();
for each(var item:Object in canChooseList){
var theName:String=item.handlerName;
if(theName.indexOf(txt)!=-1){
temp.addItem(item);
}
}
leftList.dataProvider=temp;
}
}
]]>
</mx:Script>
</mx:VBox>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;
[Bindable]public var titleName:String;//标题
[Bindable]public var canChooseList:ArrayCollection=new ArrayCollection();
[Bindable]public var chosenList:ArrayCollection=new ArrayCollection();
private function doChoose():void{
if(leftList.selectedItem){
chosenList.removeAll();
chosenList.addItem(leftList.selectedItem);
}else{
Alert.show("请先选择一个处理人!","提示");
}
}
private function unChoose():void{
chosenList.removeAll();
}
public function validate():Boolean{
var result:Boolean=false;
if(chosenList!=null&&chosenList.length>0){
result=true;
}
return result;
}
private function filteHandler():void{
var txt:String=chooseUser.text;
if(txt==null||txt==""){
leftList.dataProvider=canChooseList;
}else{
var temp:ArrayCollection=new ArrayCollection();
for each(var item:Object in canChooseList){
var theName:String=item.handlerName;
if(theName.indexOf(txt)!=-1){
temp.addItem(item);
}
}
leftList.dataProvider=temp;
}
}
]]>
</mx:Script>
</mx:VBox>
- flex List使用2
- Flex List组件的使用
- Flex List组件的使用
- flex List的使用1
- flex list拖拽 calculateDropIndex方法的使用
- 在flex中怎么使用List和Tree
- 使用Flex 4的定制化Sortable List元件
- Flex 中List控件的使用,绑定XML!
- Flex学习之路之二十三 List的使用
- flex控件list
- Flex List 分页
- Descriptive Flex Field List
- Flex样式-List篇
- [Flex]Flex使用札记
- flex 拖拽使用2
- flex AdvancedDataGrid的使用2
- open source Flex project list
- open source Flex project list
- extjs分页
- WebGIS开发,给自己布置的任务【ing】
- rails中的request
- SQL注入式攻击的解决办法
- NPN型三极管
- flex List使用2
- Oracle中的位图索引及用法
- .NET之验证控件大全
- android开发使用TextView/EditText应该注意的地方
- autotrace显示绑定变量执行计划不准确
- PEB及PEB_LDR_DATA结构
- spring定时任务时间格式cronExpression设置
- 移植FFmpeg到android ics
- Java与C互相调用实例详解