abap2UI5/src/01/03/z2ui5_cl_ui5_model_js.clas.abap
oblomov-dev 5280439bac
new-ui5-frontend (#1463)
* new app

* update structure

* update folder structure

* update

* update

* update

* Delete src/01/03/z2ui5_cl_ui5_cc_js.clas.abap

* update

* Update src/02/z2ui5_if_types.intf.abap

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* update

* update

---------

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
2024-09-29 23:36:48 +02:00

45 lines
1.2 KiB
ABAP

CLASS z2ui5_cl_ui5_model_js DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
CLASS-METHODS get
RETURNING
VALUE(result) TYPE string.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_ui5_model_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| &&
`});`.
ENDMETHOD.
ENDCLASS.