
Flex3
文章平均质量分 73
yue2008
这个作者很懒,什么都没留下…
展开
-
Alert消息框的使用
1、修改默认的按钮标签 Alert.yesLabel = "是"; Alert.noLabel = "否"; Alert.okLabel = "确定"; Alert.cancelLabel = "取消"; 2、为按钮指定自定义事件 Alert.show("确定要提交吗?", "提示", Alert.OK|Alert.CANCE2009-06-16 22:52:51 · 297 阅读 · 0 评论 -
用Flex Ant Tasks手工编译源文件
<?xml version="1.0" encoding="utf-8"?><project name="Flex Ant Task" default="wrapper" basedir="."> <taskdef resource="flexTasks.tasks" classpath="${b2009-07-14 11:28:44 · 122 阅读 · 0 评论 -
URLLoader的使用
<mx:Script> <![CDATA[ import com.cjm.common.StringUtil; private var _urlLoader:URLLoader; private function completeHandler(event:Event):void{ txt1.text = StringUtil.tri...2009-07-15 14:25:41 · 364 阅读 · 0 评论 -
Flex与JavaScript之间的交互
一、mxml文件中的源码<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()"> <mx:Script>2009-07-15 16:04:34 · 109 阅读 · 0 评论 -
在Flex中访问JSP的session、application属性值
在开发web程序的过程中,我们经常要从session、application等JSP内置对象中获取变量值,在jsp页面、servlet中我们很容易就能办到,但是在Flex中就比较麻烦。不过,通过变通的方法我们还是可以从session、application对象中获取变量值的,其思路就是:通过HttpService组件访问一个通用的HttpServlet类,在HttpServlet类中根...2009-07-15 16:35:56 · 124 阅读 · 0 评论 -
通过RemoteObject在客户端与服务端间传递复杂对象:传递Bean对象
一、Java服务端类源码 1、User类源码package com.cjm.flex;public class User { private String username; private String password; public String getUsername() { return username; } public voi...2009-07-16 11:25:19 · 254 阅读 · 0 评论 -
通过RemoteObject组件从服务端返回List对象
1、Java类方法源码public List listUsers(){ List list = new ArrayList(); User u1 = new User("uid1", "pwd1"); User u2 = new User("uid2", "pwd2"); User u3 = new User("uid3", "pwd3"); list.2009-07-16 14:18:28 · 160 阅读 · 0 评论 -
通过RemoteObject组件从服务端返回Array对象
1、Java类方法源码public User[] usersArray(){ User[] users = new User[3]; User u1 = new User("uid1", "pwd1"); User u2 = new User("uid2", "pwd2"); User u3 = new User("uid3", "pwd3"); use2009-07-16 14:34:09 · 138 阅读 · 0 评论 -
通过RemoteObject组件从服务端返回Map对象
1、Java类方法源码public Map mapData(){ Map m = new HashMap(); m.put("username", "uid"); m.put("password", "pwd"); m.put("user", new User("uid2", "pwd2")); return m;} 2、mxml文件2009-07-16 14:52:25 · 138 阅读 · 0 评论 -
Graniteds-2.x源码分析(一)
一、org.granite.config.GraniteConfigListener监听器类主要实现以下功能: 1、装载GraniteConfig 如果在ServletContext中存在GraniteConfig对象,则从ServletContext中取;否则,根据granite-config.xml配置文件生成GraniteConfig对象,同时set到ServletContex...2009-07-23 17:08:47 · 301 阅读 · 0 评论 -
Flex + GraniteDS + Spring + SpringSecurity的整合
一、web.xml文件的配置<context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/applicationContext*.xml </param-value></context...2009-08-03 10:20:51 · 126 阅读 · 0 评论 -
RemoteObject组件访问Spring Bean的整合方法
1、下载第三方组件flex_spring,将SpringFactory类添加到项目中。 2、在services-config.xml文件中添加以下配置信息:<factories> <factory id="spring" class="com.cjm.flex.SpringFactory"/></factories> 3、配置bea...2009-07-08 22:27:08 · 110 阅读 · 0 评论 -
在使用RPC组件时经常会碰到的问题
1、在用HttpService组件获取数据,并将数据转成JSON格式时,经常会抛出类似以下的异常:JSONParseError: Unexpected u encountered 。解决的办法是:将json数据的key用双引号(用单引号也不行)括起来,比如 将 {username:"uid", password:"pwd"} 改成 {"username":"uid", ...2009-07-08 22:00:05 · 533 阅读 · 0 评论 -
菜单(Menu)的使用
一、菜单项的属性 1、label:菜单项名称。 2、type:菜单项类型。包括:normal、check、radio、separator。 3、enabled:菜单项是否可用,true or false。 4、toggled:当菜单项选中时返回true,否则,返回false。当type属性值为check或radio时有效。 5、group...2009-06-18 21:32:03 · 909 阅读 · 0 评论 -
日期控件的使用
一、日期选择器控件(DateChooser Control) 1、dayNames:定义星期的名字。 2、monthNames:定义月份的名称。 3、disabledDays:指明一周中不能选择的日期。选择范围为0-6。 4、yearNavigationEnabled:是否可选择年份。 5、selectedDate:控件最初的选...2009-06-18 23:30:53 · 274 阅读 · 0 评论 -
滑块控件(Slider Control)的使用
一、控件主要属性 1、labels:控件的起点和终点标签。 2、minimum:可选择的最小值 3、maximum:可选择的最大值。 4、tickInterval:相邻坐标之间的距离值。 5、snapInterval:数值增加的步长。 6、allowTrackClick:是否允许在单击滑轨时滑块移到被单击的地方。 ...2009-06-19 22:48:22 · 2439 阅读 · 0 评论 -
列表控件的使用(一)
与列表相关的控件有:列表控件(List Control)、水平列表控件(HorizontalList Control)、片式列表控件(TileList Control)、组合框控件(ComboBox Control)等。这些控件直接或间接地继承mx.controls.listClasses.ListBase类。 一、ListBase类 一)常用的属性 ...2009-06-20 16:15:39 · 339 阅读 · 0 评论 -
列表控件的使用(二)
四、瓦片式列表控件(TileList Control)的使用 一)使用默认的条目渲染器TileListItemRenderer。它包括两个属性:label和icon。<mx:TileList x="344" y="77" fontSize="12" height="262" width="330" maxColumns="3" rowHeight=2009-06-20 18:13:43 · 122 阅读 · 0 评论 -
数据表格控件(DataGrid Control)的使用
一、数据表格控件的常用属性 1、draggableColumns:是否允许通过拖放来改变列的顺序。 2、editable:是否允许编辑表格中的内容。 3、minColumnWidth:最小列宽。 4、resizableColumns:是否允许通过拖动表头的网格线来改变列宽。 5、sortableColumns:是否允许通过单击列...2009-06-21 22:11:58 · 1036 阅读 · 0 评论 -
组合框(ComboBox)的使用
一、常用属性 二、范例<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <!-- 组合框默认以label作为标签字段,data作为值字段 -->2009-06-22 18:08:33 · 697 阅读 · 0 评论 -
树形控件(Tree Control)的使用
一、树形控件的常用属性 1、dragMoveEnabled:是否在拖放的过程中将节点移动,而不是复制。 2、folderOpenIcon:展开节点时的节点图标 3、folderClosedIcon:关闭节点时的节点图标 4、defaultLeafIcon:叶子节点的图标 5、openItems:在初始化时展开的节点集。 ...2009-06-24 21:17:20 · 1165 阅读 · 0 评论 -
数字步进器(NumericStepper Control)
一、常用属性 1、minValue:步进器的最小值 2、maxValue:步进器的最大值 3、stepSize:步长 4、value:当前选择的值 二、范例<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www....2009-06-29 21:06:18 · 1105 阅读 · 0 评论 -
Flex RPC服务组件的使用
Flex RPC服务组件包括三种服务组件:WebService、HttpService、RemoteObject。RPC服务组件包含在Flex SDK和Flex Data Service(现改名为LiveCycle Data Services,简称LCDS)中。只有在Flex Data Service中才可以使用RemoteObject组件,在Flex SDK中不能使用该组件。 ...2009-07-08 20:53:23 · 153 阅读 · 0 评论 -
Flex AIR —— 文件读写
一、文件内容<funds> <fund> <name>中银中国</name> <lot>274</lot> <net>1.6612</net> </fund> <fund>2009-08-12 20:59:13 · 164 阅读 · 0 评论