Flex 中使用mx:Model 对数据进行存储
2011-09-13 17:57
555 查看
Flex 中使用mx:Model 对数据进行存储
代码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" fontSize="13">
<mx:Model id="employeemodel">
<employees>
<employee>
<name>John Smith</name>
<department>技术部</department>
<email>john@163.com</email>
</employee>
<employee>
<name>Tom Steve</name>
<department>人力资源部</department>
<email>tom@163.com</email>
</employee>
<employee>
<name>Jeek</name>
<department>后勤部</department>
<email>jeek@163.com</email>
</employee>
</employees>
</mx:Model>
<mx:Panel title="使用Model组件">
<mx:DataGrid dataProvider="{employeemodel.employee}">
<!-- 绑定数据 -->
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="员工名"/>
<mx:DataGridColumn dataField="department" headerText="部门"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:Application>
对存储数据进行显示效果:
![](http://s3.sinaimg.cn/bmiddle/5fc12857t72ffe00f5d42&690)
http://blog.sina.com.cn/s/blog_5fc128570100fm2f.html
代码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" fontSize="13">
<mx:Model id="employeemodel">
<employees>
<employee>
<name>John Smith</name>
<department>技术部</department>
<email>john@163.com</email>
</employee>
<employee>
<name>Tom Steve</name>
<department>人力资源部</department>
<email>tom@163.com</email>
</employee>
<employee>
<name>Jeek</name>
<department>后勤部</department>
<email>jeek@163.com</email>
</employee>
</employees>
</mx:Model>
<mx:Panel title="使用Model组件">
<mx:DataGrid dataProvider="{employeemodel.employee}">
<!-- 绑定数据 -->
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="员工名"/>
<mx:DataGridColumn dataField="department" headerText="部门"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
</mx:Application>
对存储数据进行显示效果:
http://blog.sina.com.cn/s/blog_5fc128570100fm2f.html
相关文章推荐
- Scrapy爬虫系列笔记之六:使用item以及对得到的数据进行存储以及处理_by_书訢
- 使用Runtime对用户数据进行归档存储
- 如何在 ASM 存储中使用 Data Pump (expdp impdp)进行数据导出导入操作
- 使用SharedPreferences进行数据的存储实例:增删改查联系人界面
- Android 使用SharedPreferences进行数据存储和读取数据
- 九、使用SharedPreferences进行数据存储
- 九、使用SharedPreferences进行数据存储
- Flex 使用ArrayCollection的FilterFunction进行数据过滤
- Flex 使用ArrayCollection的FilterFunction进行数据过滤
- 使用文件进行数据存储
- Flex 使用ArrayCollection的FilterFunction进行数据过滤
- 使用SharePreferences进行数据存储
- 对象文件[置顶] 如何在 ASM 存储中使用 Data Pump (expdp impdp)进行数据导出导入操作
- 使用SharedPreferences进行数据存储
- android中使用SharedPreferences进行数据存储的操作方法
- Swift - 使用NSUserDefaults来进行本地数据存储
- Flex中mx:model和mx:xml的使用
- Android学习笔记(八)-使用SharedPreferences进行数据存储
- 使用SharedPreferences进行数据存储与访问
- AngularJs 在ng-repeat中动态使用ng-model进行双向数据绑定