HTML5 developing mobile Web Applications--sap UI5 (8)

Source: Internet
Author: User
Tags i18n

This paper briefly summarizes the knowledge of SAP UI5 framework before learning, and combs the key parts of knowledge.

1, in the UI5 use process, the concept of the namespace is very important.

2, the General SAP component reference format is as follows:

Sap.ui.define ([   "Sap/ui/core/uicomponent",   "Sap/ui/model/json/jsonmodel",   

after define each reference to a component of SAP, the function behind it will pass in a corresponding parameter.

3. The following is the basic framework used by component :

Sap.ui.define ([   "sap/ui/core/uicomponent"], function (UIComponent) {   "use strict";   Return Uicomponent.extend ("", {       init:function () {         //Call the Init function of the parent         Uicomponent.proto Type.init.apply (this, arguments);});}   );

Component construction process, such asextend UIComponent This framework, inside init is the initialization function, which can set other properties (including configuration model, etc.), as follows:

Sap.ui.define ([   "Sap/ui/core/uicomponent",   "Sap/ui/model/json/jsonmodel", "   sap/ui/model/resource/ Resourcemodel "], function (UIComponent, Jsonmodel, Resourcemodel) {   " use 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); 
   //Set data Model         var oData = {            recipient: {               name: "World"            }         };         var Omodel = new Jsonmodel (oData);         This.setmodel (Omodel);          Set i18n model         var I18nmodel = new Resourcemodel ({            bundlename: "sap.ui.demo.wt.i18n.i18n"         });         This.setmodel (I18nmodel, "i18n");});   

4, note the importance of manifest file in an application, Manifest.json is the app 's configuration file.

HTML5 developing mobile Web Applications--sap UI5 (8)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.