首页 > 作文

HTML5开发移动web应用——SAP UI5篇(8)

更新时间:2023-04-03 02:10:18 阅读: 评论:0

本次对之前学习的sap ui5框架知识进行简单小结,以及重点部分知识的梳理。

1、在ui5使用过程中,命名空间的概念很重要。

2、一般的sap引用格式如下:

sap.ui.define([   "sap/ui/core/uicomponent",   "sap/ui/model/json/jsonmodel",   "sap/ui/model/resource/resourcemodel"], function (uicomponent, jsonmod桀骜不驯的反义词el, resourcemodel) 

define后每引用sap的一个组件,后面的function就要传入一个对应的参数。

3、以下是component使用的基本框架:

sap.ui.define([   "sap/ui/core/uicomponent"], function (uicomponent) {   "u strict";   return uicomponent.extend("", {       init : function () {         // call the init function of the parent         uicomponent.prototype.init.apply(this, arguments);}   });});

component的构建流程如上,extenduicomponent这个框架,里面init为初始化圣诞节食物函数,里面可以设定其他属性(包括配置模型等),如下:

sap.ui.define([   "sap/ui/core/uicomponent",   "sap/ui/model/岳阳楼记赏析json/jsonmodel",   "sap/ui/model/resource/resourcemodel"], function (uicomponent, jsonmodel, resourcemodel) {   "u strict";   return uicomponent.extend("sap.ui.demo.wt.component", {            metadata : {rootview: "sap.ui.demo.wt.view.app"},      init : function () {         // call the init function of the parent         uicomponent.prototype.init.apply(this, arguments);         // t data model         var odata = {            recipient : {               name : "world"   文天祥爱国诗句         }         };         var omodel = new jsonmodel(odata);         this.tmodel(omodel);          // t i18n model         var i18nmodel = new resourcemodel({            bundlename : "sap.ui.demo.wt.i18n.i18n"         });       美国留学语言要求  this.tmodel(i18nmodel, "i18n");      }   });});

4、注意manifest文件在一个应用中的重要性,manifest.json是app的配置文件。

本文发布于:2023-04-03 02:10:16,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/154d09bad1215e5d528d2c92948ced40.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:HTML5开发移动web应用——SAP UI5篇(8).doc

本文 PDF 下载地址:HTML5开发移动web应用——SAP UI5篇(8).pdf

标签:框架   知识   爱国   反义词
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图