abap2UI5/src/01/03/z2ui5_cl_ui5_app_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

55 lines
1.9 KiB
ABAP

CLASS z2ui5_cl_ui5_app_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_app_js IMPLEMENTATION.
METHOD get.
result = `sap.ui.define(["sap/ui/core/mvc/Controller",` && |\n| &&
` "z2ui5/controller/View1.controller",` && |\n| &&
`], function (BaseController, Controller) {` && |\n| &&
` return BaseController.extend("z2ui5.controller.App", {` && |\n| &&
|\n| &&
` onInit: async function () {` && |\n| &&
|\n| &&
` z2ui5.oConfig.pathname = this.getView().getModel().sServiceUrl;` && |\n| &&
` if (z2ui5.oConfig.pathname == '_LOCAL_') { ` && |\n| &&
` z2ui5.oConfig.pathname = window.location.href; ` && |\n| &&
` }; ` && |\n| &&
` z2ui5.oController = new Controller();` && |\n| &&
` z2ui5.oController.setApp(this.getView().byId("app"));` && |\n| &&
|\n| &&
` z2ui5.oControllerNest = new Controller();` && |\n| &&
` z2ui5.oControllerNest2 = new Controller();` && |\n| &&
` z2ui5.oControllerPopup = new Controller();` && |\n| &&
` z2ui5.oControllerPopover = new Controller();` && |\n| &&
|\n| &&
` z2ui5.onBeforeRoundtrip = [];` && |\n| &&
` z2ui5.onAfterRendering = [];` && |\n| &&
` z2ui5.onBeforeEventFrontend = [];` && |\n| &&
` z2ui5.onAfterRoundtrip = [];` && |\n| &&
|\n| &&
` z2ui5.checkNestAfter = false;` && |\n| &&
|\n| &&
` }` && |\n| &&
` });` && |\n| &&
`});`.
ENDMETHOD.
ENDCLASS.