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

Source: Internet
Author: User
Tags i18n

This is a brief summary of the SAP UI5 framework knowledge previously learned. And the key part of the knowledge of the carding.

1 . In the process of UI5, the concept of namespaces is very important.

2 . General SAP component Reference formats such as the following:

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

Define after each reference to a component of SAP. The function in the back will pass in a corresponding argument.

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.PR Ototype.init.apply (this, arguments);});}   );

component build process as above, extend  UIComponent init Span style= "font-family: Arial" is the initialization function. You can set other properties (including configuration models), such as the following:

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)

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.