Fiori 代码规范2---代码结构详解2
来源:互联网 发布:我的世界商店js制作 编辑:程序博客网 时间:2024/05/22 12:33
2.3 view
There are 4 view types: XML view, JS view, HTML view and JSON view.
Usually we use XML view in the projects. In the XML view, we create the view bycomponent labels.
In the labels we can set properties value to modify the view. We use sap.m librarydefault , and for other libraries, we will define alias and user in the viewwith colon:
2.3.1 Layout & Pages
Forthe page layout, there are usually types:
Basicview(Single page) or Master-Detail view.
i. sap.m.App : for Single page app
ii. sap.m.SplitApp : for Master-Detail page app
For morelayout and page, please checkhttps://sapui5.netweaver.ondemand.com/#/controls ,Layout & Pages section.
2.3.2 Model
There are 4 model types:
• JSON Model
• OData Model
• Resource Model (only used for i18n right now)
• XML Model (not used)
ODataModels& JSONModels can also be added to the manifest.json file (that’s how youcan use them in your whole application)
We canset default model without alias for a view. If we have more than one model inthe view, we must give alias for different models. We can bind the model datato the view in the following way:
{modelName>/ fieldName}
a) JSON model :
i. instantiate a JSON model and set the model to the view in the controller.
b) ODataModel : we can use 2 ways to declare the ODataModel:
i. configure datasources in manifest.json file, for table/ list/ smart form we can bind the entitySet to the view component directly.
ii. add the following code in init function of Component.js
c) Resource Model :
Resource Model is for i18n multiplelanguages.
- Fiori 代码规范2---代码结构详解2
- Fiori 代码规范2---代码结构详解1
- Fiori 代码规范2---代码结构详解3
- Fiori 代码规范2---代码结构详解4
- Fiori 代码规范2---代码结构详解5
- Fiori 代码规范1---项目结构
- Fiori 代码规范0---导读
- SAP Fiori 常用事务代码
- 代码注释规范(2)
- Python 目录结构,代码规范
- java 规范的代码结构
- mvc3[2]写代码规范
- 团队代码规范v1.2
- Uncrustify 代码强制规范2
- 工作总结2-代码规范问题
- PSR-2 基本代码规范
- PSR-2 代码风格规范
- rails 代码结构详解
- Docker 复习 . 常用命令(待续)
- 安全渗透面试题集锦(持续更新)
- GPS数据格式
- 初学Python第七天
- LINUX常用命令
- Fiori 代码规范2---代码结构详解2
- Sublime Text 3安装SFTP插件
- POJ-1305-Fermat vs. Pythagoras-(本原勾股数)
- Java单链表和顺序表性能分析对比
- path与classpath区别
- Android Studio中常用快捷键
- 线性表的链式存储和实现
- 微微
- 二分搜索