itemRender---之outerDocument : 使用itemRender 和item Editor时想要访问外部变量或方法的关键字
来源:互联网 发布:广告优化师前景怎样 编辑:程序博客网 时间:2024/06/07 08:18
You use the <mx:Component> tag to define an inline item renderer or item editor in an MXML file.
The <mx:Component> tag defines a new scope within an MXML file, where the local scope of the item renderer or item editor is defined by the MXML code block delimited by the <mx:Component> and </mx:Component> tags. To access elements outside of the local scope of the item renderer or item editor, you prefix the element name with the outerDocument keyword.
For example, you define one variable named localVar in the scope of the main application, and another variable with the same name in the scope of the item renderer. From within the item renderer, you access the application's localVar by prefixing it with outerDocument keyword, as the following example shows:
Flex代码
One use of the outerDocument keyword is to initialize the data provider of a control within the inline item editor. For example, you can use a web service, or other mechanism, to pass data into the application, such as the list of U.S. states. You can then initialize all ComboBox controls that are used as item editors from a single property of the application that contains the list of U.S. states.
MXML Syntax
The <mx:Component> tag has the following syntax:
<mx:Component id="" className="" >
... child tags
... </mx:Component>
You cannot create an empty <mx:Component></mx:Component> tag; you must define at least one child tag within the <mx:Component></mx:Component> tags.
The id property lets you specify an identifier for the inline component so that you can use it as the source for a data binding expression.
The className property lets you specify the name of the class generated by Flex for the inline component so that you can reference the elements of the component in ActionScript. For more information, see the Using Item Renderers and Item Editors chapter in the Flex Developer's Guide book.
thaks:http://blog.csdn.net/tingqier/archive/2008/10/17/3090326.aspx
Flex代码
from:http://blog.minidx.com/2008/05/10/837.html
- itemRender---之outerDocument : 使用itemRender 和item Editor时想要访问外部变量或方法的关键字
- outerDocument : 使用itemRender 和item Editor时想要访问外部量的关键字
- ItemRender---之使用ClassFactory生成渲染器
- 诡异的itemRender
- flex在使用itemrender时,再次刷新数据时itemrender错乱问题
- ItemRender---之理解 Flex itemRenderer - 状态和过渡
- 诡异的itemRender,解决itemRender有时显示不出问题
- 当ItemRender用ComboBox的时选项的重置问题
- DataGrid中itemRender的用法--解决item中组件显示的问题
- flex itemRender 与父组件的通讯
- Flex itemrender event 冒泡的问题
- FLEX中使用itemRenderer调用父页面的方法使用关键字outerDocument
- DataGrid,ItemEditors,ItemRender
- Flex datagrid itemrender/itemeditor
- Flex tree ItemRender
- ItemRender---之用 ActionScript类来编写itemRenderer
- ItemRender---实例之动态计算表格中的一行结果
- Java基础之static域访问外部变量和方法
- 软考--数据通信与网络基础
- ASP.NET之ViewState
- 获取线程中某个函数执行完成所获得的CPU时间量
- MLB Jerseys Sagp core synergistics
- jquery grep
- itemRender---之outerDocument : 使用itemRender 和item Editor时想要访问外部变量或方法的关键字
- 迁移数据库服务器-每个数据库
- asp.net中gridview中数据保存为cvs格式,datatable中
- 一个好领导是非常重要的
- Discuz!nt中的序列化的学习
- 还原数据库服务器-每个数据库
- VC6.0 下MFC程序与MySql数据库连接的设置
- SQL查询有关 sql_variant 值的基本数据类型和其他信息
- C语言的谜题