- 浏览: 958021 次
- 性别:
- 来自: 珠海
文章分类
最新评论
-
Yunjey:
Yunjey 写道这样子的话、grid中的editable如何 ...
Flex创建可编辑以及分页的DataGrid -
Yunjey:
这样子的话、grid中的editable如何设置啊?!
Flex创建可编辑以及分页的DataGrid -
di1984HIT:
写的很好~~
JCalendar组件 -
sanny81:
此文真棒!感谢一路风尘的奉献!
但我有一疑 ...
Filter发送自定义数据详解 -
umgsai:
求完整demo umgsai@126.com
Flex和Jsp创建用户登入系统
主程序:TitleWindowDataTest.mxml
<?xml version="1.0" encoding="utf-8"?> <!-- TitleWindowDataTest.mxml An application that uses custom pop-up TitleWindowData--> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="left" layout="vertical" initialize="initApp()"> <mx:Script><![CDATA[ import mx.containers.TitleWindow; import mx.managers.PopUpManager; import mx.collections.ArrayCollection; [Bindable]public var gsBindMe:String = "Change me!" ; [Bindable]private var acDP2:ArrayCollection; [Bindable]public var acItemsSelected:ArrayCollection; //set by itemClick private function initApp():void { acDP2 = new ArrayCollection(); acDP2.addItem({artist:"Pink Floyd",price:29.99,album:"Meddle"}); acDP2.addItem({artist:"Pink Floyd",price:29.99,album:"More"}); acDP2.addItem({artist:"Genesis",price:22.99,album:"Trespass"}); acDP2.addItem({artist:"Yes",price:22.99,album:"Close to the Edge"}); acDP2.addItem({artist:"King Crimson",price:21.99,album:"Wake of Posiedon"}); }// private function showTitleWindow():void { var titleWindowInstance:TitleWindowData = TitleWindowData(PopUpManager.createPopUp(this, TitleWindowData, false)); //instantiate and show the title window PopUpManager.centerPopUp(titleWindowInstance); titleWindowInstance.title = "Non-Modal Title Window Data";//built-in property titleWindowInstance.width = 400; //built-in property titleWindowInstance.height = 450; //built-in property titleWindowInstance.mainApp = this; //Reference to the main app scope titleWindowInstance.gnMyNumber = parseFloat(tiMyNumber.text); //Pass a simple value to the popup } private function showSelectedItems(event:Event):void { acItemsSelected = new ArrayCollection(dg2.selectedItems) } ]]></mx:Script> <mx:Label text="Main App" fontSize="18" /> <mx:Text text="Selected Items will be passed into the pop-up. Select an item and click 'Show Title Window' button" width="300"/> <mx:DataGrid id="dg2" allowMultipleSelection="true" itemClick="showSelectedItems(event)" dataProvider="{acDP2}" > <mx:columns> <mx:Array> <mx:DataGridColumn headerText="Artist" dataField="artist" /> <mx:DataGridColumn headerText="Price" dataField="price" editable="true"/> <mx:DataGridColumn headerText="Album" dataField="album" /> </mx:Array> </mx:columns> </mx:DataGrid> <mx:HBox > <mx:Label text="MyNumber:" width="100"/> <mx:TextInput id="tiMyNumber" text="99"/> </mx:HBox> <mx:HBox > <mx:Label text="Bind Me" width="100"/> <mx:TextInput id="tiBindMe" text="{gsBindMe}" change="gsBindMe = tiBindMe.text"/> </mx:HBox> <mx:Button label="Show Title Window (Non-Modal)" click="showTitleWindow()"/> <mx:HBox > <mx:Text text="Final Selection: From item selected in pop-up" width="100"/> <mx:TextInput id="tiFinalSelection"/> </mx:HBox> </mx:Application>
自定义组件:TitleWindowData.mxml
<?xml version="1.0" encoding="utf-8"?> <!-- TitleWindowData.mxml A sample custom pop-up that extends TitleWindow--> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="initComponent()" showCloseButton="true" close="closeWindow()"> <mx:Script><![CDATA[ import mx.managers.PopUpManager; import mx.collections.ArrayCollection; [Bindable]public var mainApp:TitleWindowDataTest = null; [Bindable]public var gsMyString:String; [Bindable]public var gnMyNumber:Number; [Bindable]public var acItemsSelected:ArrayCollection; private function initComponent():void { } private function closeWindow():void { PopUpManager.removePopUp(this); }//closeWindow private function showFinalSelection(oEvent:Event):void { mainApp.tiFinalSelection.text = oEvent.target.selectedItem.album; }//showFinalSelection ]]></mx:Script> <mx:Text text="The data grid below shows the selectedItems in the data grid in the Main app. This dataProvider is bound to a local variable which is set by Main App datagrid itemClick. Select additional items(ctrl-click) in Main App, they will display here. Select an item here. It will display in Main App 'Final Selection' control." width="300" /> <mx:DataGrid id="dg2" rowCount="3" dataProvider="{mainApp.acItemsSelected}" change="showFinalSelection(event)" > <mx:columns> <mx:Array> <mx:DataGridColumn headerText="Artist" dataField="artist" /> <mx:DataGridColumn headerText="Price" dataField="price" editable="true"/> <mx:DataGridColumn headerText="Album" dataField="album" /> </mx:Array> </mx:columns> </mx:DataGrid> <mx:HBox > <mx:Label id="lblMyNumber" text="{gnMyNumber}" width="100"/> <mx:Text text="Bound to local variable set at pop-up. Changes to Main App control do NOT change this" width="200" /> </mx:HBox> <mx:HBox > <mx:Label text="{mainApp.gsBindMe}" width="100"/> <mx:Text text="Bound to mainApp local variable via passed in reference. Changes in Main App DO change this." width="200" /> </mx:HBox> </mx:TitleWindow>
效果如下:
http://www.box.net/shared/cbb3pqbrmx
Original paper:http://benben.iteye.com/blog/278275
发表评论
-
Rounded Colorized Image Borders
2009-05-16 22:24 1041This week I ran across a really ... -
Flex使用自定义皮肤和字体
2009-03-29 14:57 4182首先介绍两个Flex皮肤网站: 1. Skins and Th ... -
Flex--XML转换成ArrayCollection
2009-03-28 23:24 9571xml数据: <?xml version="1 ... -
Flex使用弹出窗口为DataGrid添加新数据
2009-03-28 21:01 2587经常在Demo中会看到列表,表格等方式来显示数据。当然有时候也 ... -
关于Flex使用Blazeds连接Java后台的一个注意笔记
2009-03-24 16:49 2180今天在做Flex程序测试的时候,发现之前可以通过Blazeds ... -
Flex-设置DataGrid被选择行的风格
2009-03-22 20:54 7163这里例子将展示如何使用用户自定义的item renderer来 ... -
Flex使用JSON格式与Java通信
2009-03-22 00:09 7278在使用Flex,Java,Json更新Mysql数据【高级篇】 ... -
Flex中显示手型鼠标
2009-03-06 21:40 5179有些时候,我们需要在Flex组件上--Label或者Butto ... -
Flex与JSON及XML的互操作
2009-03-01 17:18 1854作者 Jack Herrington 译者 张凯 ... -
Flex代码格式化插件
2009-03-01 16:52 2708在7Yue 那里看到这个轻巧实用的Eclipse插件,它可以 ... -
Flex-CUBlog排行榜解析
2008-07-29 20:55 1921不知道为什么一直有一个想法把CUBlog排行榜的数据提取出来放 ... -
使用Flex,Java,Json更新Mysql数据【高级篇】
2008-06-24 20:21 5781前面已经介绍如何使用Flex,java,json来更新dat ... -
Flex+Java Servlet文件上传实例
2008-06-23 21:05 20210资源都是来自网上。本实例将展示使用Flex和java serv ... -
Flex和Jsp创建用户登入系统
2008-06-22 16:16 4256在开始之前我们先来看下效果:【userName==passwo ... -
Flex中嵌入Google地图
2008-06-18 22:29 5931在我们开始之前,先来看一个例子:http://scriptpl ... -
Flex程序发布
2008-06-17 23:32 3972当你写好了一个Flex程序,想要按照某种方式发布。比如我们在 ... -
Flex自定义Alert窗口显示位置
2008-06-16 18:25 6273好像Flex3也没有找到可以直接使用的(x,y)的方法来指定A ... -
Flex支持滑轮滚动
2008-06-16 18:23 3396有些时候需要在Flex界面中支持鼠标的滑轮滚动功能,比如通过滑 ... -
Flex实现简单的Email发送
2008-06-14 16:35 4244本文主要介绍和实现怎么使用Flex-java来实现Em ... -
Flex创建可编辑以及分页的DataGrid
2008-06-13 16:32 14803之前那篇文章:使用Flex,Java,Json更新Mys ...
相关推荐
spring-flex-1.5.0.M2-dist.zip spring-flex-1.5.0.M2 spring-flex-1.5.0.M2.jar SBI
Flex-TitleWindow的弹出窗口中播放一段影像.zip Flex-TitleWindow的弹出窗口中播放一段影像.zip Flex-TitleWindow的弹出窗口中播放一段影像.zip
flex-2.6.4.tar.gz
flex-messaging类包是flex结合JAVA开发通信使用
flex-messaging-4.7.3最新版本的jar
flex-messaging-core jar包
spring-flex-1.5.0.RELEASE spring-flex-1.5.0.RELEASE spring-flex-1.5.0.RELEASE spring-flex-1.5.0.RELEASE
flex-messaging-common
flex-messaging-proxy.jarflex-messaging-proxy.jarflex-messaging-proxy.jarflex-messaging-proxy.jar
资源包含flex-2.5.4+bison-2.4.1+mingw,此外包含本人写的测试源码,编译命令及详细过程,另附一些有用的文章pdf,用于编译原理课程学习。详细使用参考文章:...
flex-2.5.4a flex-2.5.4a-29.i386 flex-2.5.4a-29.i386.rpm
flex-iframe-1.4.6.rar (code google)
org.springframework.flex-1.0.3.RELEASE.jar.zip用于JAR包,org.springframework.flex-1.0.3.RELEASE.jar.zip用于JAR包org.springframework.flex-1.0.3.RELEASE.jar.zip用于JAR包org.springframework.flex-1.0.3....
flex-messaging-remoting.jarflex-messaging-remoting.jarflex-messaging-remoting.jarflex-messaging-remoting.jar
flex-messaging-common.jarflex-messaging-common.jarflex-messaging-common.jarflex-messaging-common.jar
安装wireshark时找到的资源,分享给需要的人。 已经忘记当时为什么安装wireshark需要安装flex了,可能系统信息不全,或者裁剪版的吧 总之,分享给有需求的人
flex-messaging-core.jar
flex-messaging-core-amf1.7
flex-messaging-opt.jarflex-messaging-opt.jarflex-messaging-opt.jarflex-messaging-opt.jar