<!-- [if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning/>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<w:DoNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<w:DoNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!-- [if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<!-- [if gte mso 10]>
<mce:style><!--
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
table.MsoTableGrid
{mso-style-name:网格型;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-border-insideh:.5pt solid windowtext;
mso-border-insidev:.5pt solid windowtext;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
-->
<!-- [endif]-->
Flex
引入了元数据标签的概念,大多数人都使用过的
[Bindable]
标签便是其中的
meta tag
之一,它在代码中的作用就是向编译器提供如何编译程序的信息。实际上,这些标签并没有被编译到生成的
SWF
文件中,而只是告诉编译器如何生成
SWF
文件。
adobe
官网
http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html详细讲解了
16种
meta
的使用,简单如下表所示。
Tag
|
Description
|
[ArrayElementType]
|
Defines the allowed data type of each element of an Array.
|
[Bindable]
|
Identifies a property that you can use as the source of a data
binding expression.
|
[DefaultProperty]
|
Defines the name of the default property of the component when you
use the component in an MXML file.
|
[Deprecated]
|
Marks a class or class element as deprecated so that the compiler
can recognize it and issue a warning when the element is used in an
application.
|
[Effect]
|
Defines the MXML property name for the effect.
|
[Embed]
|
Imports JPEG, GIF, PNG, SVG, and SWF files at compile time. Also
imports image assets from SWC files.
|
[Event]
|
Defines the MXML property for an event and the data type of the
event object that a component emits.
|
[Exclude]
|
Omits the class element from the Flex Builder tag inspector. The
syntax is as follows:[Exclude(name="label",
kind="property")]
|
[ExcludeClass]
|
Omits the class from the Flex Builder tag inspector. This is
equivalent to the @private tag in ASDoc when applied to a class.
|
[IconFile]
|
Identifies the filename for the icon that represents the component
in the Insert bar of Adobe Flex Builder.
|
[Inspectable]
|
Defines an attribute exposed to component users in the attribute
hints and Tag inspector of Flex Builder. Also limits allowable values of the
property.
|
[InstanceType]
|
Specifies the allowed data type of a property of type
IDeferredInstance.
|
[NonCommittingChangeEvent]
|
Identifies an event as an interim trigger.
|
[RemoteClass]
|
Maps the ActionScript object to a Java object.
|
[Style]
|
Defines the MXML property for a style property for the component.
|
[Transient]
|
Identifies a property that should be omitted from data that is
sent to the server when an ActionScript object is mapped to a Java object
using [RemoteClass].
|
本人认为,这其中常用的
Bindable
,
Embed
,
RemoteClass
这
3
种(本人是从开发业务程序角度来考虑,
effect
等
ui
效果就暂且忽略了)。
<!-- [if !supportLists]-->1、
<!-- [endif]-->Bindable
标签
Bindable
标签应该是使用率最高的标签,其功效就是将某个变量或者属性绑定到目标对象上,比如业务应用经常要操作
datagrid
,此时就需将变量绑定到
datagrid.dataprovider
上,通过变量操作来显示
datagrid
的数据变动。
[
Bindable
]
private
var
transWayLists:ArrayCollection;
...
<mx:AdvancedDataGrid
dataProvider="{
transWayLists
}"/>
<!-- [if !supportLists]-->2、
<!-- [endif]-->RemoteClass
标签
该标签用以映射
flex object
到
java object
,因此在写
flex
程序与
java
程序交互之时特别有用,比如
flex
登录程序总需发送登录信息到
java
登录服务,然后
java
登录服务通过验证返回登录用户信息,此时就需
flex user
映射到
java user
,如下:
flex
:
[
Bindable
]
[RemoteClass
(
alias="com.
marcus
.User"
)]
public
class
User
{
public
var
userId:String;
public
var
businessId:String;
public
var
userName:String;
public
var
password:String;
public
var
passTimeout:Date;
...
}
java:
package com.marcus;
import java.util.Date;
public class User {
private String userId;
private String businessId;
private String userName;
private String password;
private Date passTimeout;
...
}
<!-- [if !supportLists]-->3、
<!-- [endif]-->Embed
标签
该标签用以嵌入
jpg
等资源文件,并在编译的时候生成到
swf
文件中,因此嵌入资源文件过大时,会影响
swf
加载速度。
[Embed(source='home.png')]
//
绑定图片home.png
给home_icon
类
private var home_icon:Class;
<!-- [if !supportLists]-->4、
<!-- [endif]-->ArrayElementType
标签
该标签用以标识数组中元素的数据类型,该
meta tag
并未列入本人的常用
meta tag
之一,为何还要强调的原因就是本人认为
ArrayElementType
标签就是一个鸡肋标签,狗屁不是,建议大家慎用。
分享到:
相关推荐
标题 "Flex常用教程及库" 暗示了这个压缩包可能包含与Adobe Flex相关的学习资源,特别是关于PureMVC框架的一个PDF文档。Flex是一种用于构建富互联网应用程序(RIA)的开源框架,常用于创建交互性强、用户体验良好的...
如果文章涉及到Flex与Excel的结合,那么可能是在讲解如何使用Flex创建动态数据仪表板,将Excel数据实时显示在Web应用中。 2. **ActionScript与Word/Excel文件操作**: ActionScript是Flex的主要编程语言,通过AS3...
本文将详细介绍几个常用的Flex控件,包括它们的基本功能、用途以及如何使用这些控件来增强应用的表现力。 #### 二、控件详解 ##### 1. AdvancedDataGrid - **简介**: - `AdvancedDataGrid` 是一种扩展了标准 `...
比如,Accordion组件用于展示多个可折叠的面板,而TabBar组件可以创建一个多标签的界面。理解这些控件的工作原理和设计模式,有助于你灵活运用到自己的项目中。 属性介绍是教程的另一重要组成部分。这里会详细解释...
本篇文章将深入探讨“flex+java读写excel文件”这一主题,基于提供的标签和压缩包子文件名称,我们将重点讲解Flex与Java如何协同工作来实现Excel文件的导入与导出功能。 Flex是一种开源的富互联网应用程序(RIA)...
在Flex开发中,XML是一种常用的数据格式,用于存储和传输数据。XML(eXtensible Markup Language)具有自解释性,结构清晰,易于人和机器阅读。本篇将重点讲解如何在Flex中操作XML,包括从本地读取XML文件以及通过...
本教程将深入讲解`DIV+CSS`网页布局基础,特别是常用的HTML标签。 首先,我们要了解HTML的基础结构,这包括头部(`<head>`)、主体(`<body>`)和元信息(如`<meta>`标签)等。在`<body>`部分,我们经常会用到以下...
在Flex开发中,TitleWindow是一种常用的组件,它用于创建具有标题栏和可选边框的弹出窗口。这篇博客文章“Flex中支持缩放的TitleWindow”可能详细讲解了如何在Flex应用程序中实现TitleWindow组件的缩放功能,这对于...
- **访问服务器端数据**:讲解了如何使用Flex与后端服务器进行交互,包括数据的获取和提交等操作。 - **应用开发阶段**:概述了从规划到部署的各个阶段,并提供了实用的建议和技术指导。 - **SDK配置**:提供了配置...
而“工具”可能指的是与Flex开发相关的工具,如Flash Builder(一款集成开发环境,IDE),Flex SDK命令行工具,或是版本控制工具如Git,它们都是Flex开发者常用的辅助软件。 压缩包中的“Flex开发实例.pdf”很可能...
7. **集成其他框架**:标签提到有与框架集成的例子,可能包括与Spring、BlazeDS、 Cairngorm等常用框架的整合,帮助开发者了解如何在Flex应用中引入业务逻辑和数据管理。 实际操作部分可能包含: 1. **实战项目**...
通过博文链接(已省略,因为无法实际访问)我们可以推测,作者可能详细讲解了如何设置Flex项目,引入Google Maps API库,并创建地图组件,以及如何自定义地图的功能,如添加标记、信息窗口、地图操作等。 在标签中...
本节重点讲解了不同的应用布局类型及其特点,包括空白应用、基于视图的应用和标签式应用等,帮助开发者根据应用需求选择合适的布局方案。 - **空白应用**:一种没有预定义界面的应用类型,适用于完全自定义界面的...
下面我们将详细讲解移动端特点、百分比布局和Flex布局。 移动端特点: 移动端网页和PC端网页的不同点是什么?首先,PC端网页的屏幕尺寸大,网页宽度固定,而移动端网页的屏幕尺寸小,网页宽度多数为100%。其次,...
在Flex开发中,XML是一种常用的数据格式,用于存储和传输数据。本文主要讲解如何使用Flex操作XML实现增删改查的基本操作。 首先,理解XML的基本概念是至关重要的。XML(Extensible Markup Language)是一种标记语言...
2. `<input>`标签:最常用的表单元素,可以创建不同类型的输入字段,如文本输入框(type="text")、密码输入框(type="password")、复选框(type="checkbox")和单选按钮(type="radio")等。 3. `<select>`标签:...
标签进一步确认了内容的焦点,"JavaScript/JQuery JavaScript"强调了JavaScript和jQuery是主要的学习主题。JavaScript是一种广泛使用的脚本语言,常用于网页开发,提供动态交互性;jQuery则是一个JavaScript库,简化...
常用的基础标签还有`<p>`(段落)、`<h1>`到`<h6>`(标题)、`<a>`(超链接)等。 2- 表单元素:HTML表单允许用户向服务器发送数据。常用的表单元素有`<form>`、`<input>`(输入框)、`<textarea>`(多行文本输入)...
课程涵盖了Web开发的基本特点、常用技术对比、JSP的运行原理、Servlet的处理机制、MVC设计模式、Web.xml配置、Servlet生命周期、数据库组件的使用、乱码问题解决、Servlet单态模式、Session内置对象、JSTL标签的使用...