Fiori2.0学习笔记-Fragment
来源:互联网 发布:创维电视网络电视收费 编辑:程序博客网 时间:2024/06/04 23:24
fragment是一个轻量级的UI view 没有独立的Controler控制其行为
fragment是对UI的重用
- XML fragment
- HTML fragment
JS fragment
命名规则
[name].fragment.xml
var frag = sap.ui.xmlfragment([id],[fragment path],this)
this.getView().addDependent(frag)
fragment是依赖于view所以是不需要引库的
创建一个view和内置popover的fragment.XML文件
下面是控制层.
showFragment: function(oEvent) { // create dialog lazily //要检查是否实例化过,一是重复实例化后重复ID会报错,二是会影响性能,加载比较慢 if (!this._oPopover) { //实例化 this._oPopover = sap.ui.xmlfragment("richard.demo.fragmentFragmentDemoCase.view.Popover", this); //通过getView().addDependent方法把oPopover加载到view当中 this.getView().addDependent(this._oPopover); //set一个JSON对象,里面放置即将传得 值 this._oPopover.setModel(new JSONModel({myLabel:"this is my custom fragment"})); } //拿到当前点击的button var oButton = oEvent.getSource(); //放置popover的地点 this._oPopover.openBy(oButton); }
阅读全文
0 0
- Fiori2.0学习笔记-Fragment
- Fiori2.0学习笔记-GATEWAY
- Fiori2.0学习笔记-controller
- Fiori2.0学习笔记-modules
- Fiori2.0学习笔记-splitApp
- Fiori2.0学习笔记-JSONModel
- Fiori2.0学习笔记-Manifest
- Fiori2.0学习笔记-路由导航
- Fiori2.0学习笔记-Pages&panels
- Fiori2.0学习笔记-事件的处理
- Fiori2.0学习笔记-dialog应用
- Fiori2.0学习笔记-OData(new)
- Fiori2.0学习笔记-数据绑定
- Fiori2.0学习笔记-OData的应用
- Fiori2.0学习笔记-Ajax数据请求
- Fiori2.0学习笔记-问题汇总
- Fiori2.0学习笔记-BUG汇总
- Fiori2.0学习笔记-核心技术框架&基本项目结构
- 关于ARM的统一编制与内存映射机制
- 犀利的 oracle 注入技术
- Spark2.2 TaskScheduler原理剖析与源码分析
- 【Scikit-Learn 中文文档】高斯混合模型
- Git使用手册:git branch 分支操作、创建分支、查看分支、删除分支、删除本地分支、删除远程分支
- Fiori2.0学习笔记-Fragment
- NSGA
- Linux
- [Sencha] 使用 Ext.Config
- Wiremock的使用
- 算法效率的度量方法
- ECMAScript6
- 基于Android官方AsyncListUtil优化经典ListView分页加载机制(二)
- 多目标优化-测试问题及其Pareto前沿