abap2UI5/src/01/03/z2ui5_cl_app_models_js.clas.abap
oblomov-dev a09ad57472
Some checks are pending
build_downport / build_downport (push) Waiting to run
build_frontend_classic / build_frontend_classic (push) Waiting to run
build_frontend_cloud / build_frontend_cloud (push) Waiting to run
ui5lint / test (push) Waiting to run
update formatting of abap js classes (#1585)
2024-11-26 15:29:24 +01:00

45 lines
1.3 KiB
ABAP

CLASS z2ui5_cl_app_models_js DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
CLASS-METHODS get
RETURNING
VALUE(result) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_app_models_js IMPLEMENTATION.
METHOD get.
result = `sap.ui.define([` && |\n| &&
` "sap/ui/model/json/JSONModel",` && |\n| &&
` "sap/ui/Device"` && |\n| &&
`],` && |\n| &&
`function (JSONModel, Device) {` && |\n| &&
` "use strict";` && |\n| &&
`` && |\n| &&
` return {` && |\n| &&
` /**` && |\n| &&
` * Provides runtime info for the device the UI5 app is running on as JSONModel` && |\n| &&
` */` && |\n| &&
` createDeviceModel: function () {` && |\n| &&
` var oModel = new JSONModel(Device);` && |\n| &&
` oModel.setDefaultBindingMode("OneWay");` && |\n| &&
` return oModel;` && |\n| &&
` }` && |\n| &&
` };` && |\n| &&
`` && |\n| &&
`});` && |\n| &&
``.
ENDMETHOD.
ENDCLASS.