From 7ccb75b8b14088f1a285e6bcba1e30f6adb8062f Mon Sep 17 00:00:00 2001 From: oblomov <102328295+oblomov-dev@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:16:09 +0200 Subject: [PATCH] bugfix messagetoast messagebox (#150) --- src/z2ui5_cl_http_handler.clas.abap | 5 ++++- src/z2ui5_cl_http_handler.clas.locals_imp.abap | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap index 972ab1cb..3aabf5a0 100644 --- a/src/z2ui5_cl_http_handler.clas.abap +++ b/src/z2ui5_cl_http_handler.clas.abap @@ -139,7 +139,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. ` }` && |\n| && ` if (sap.z2ui5.oResponse.vViewPopup) {` && |\n| && ` ` && |\n| && - ` jQuery.sap.require("sap.ui.core.Fragment");` && |\n| && + ` ` && |\n| && ` sap.ui.core.Fragment.load({` && |\n| && ` definition: sap.z2ui5.oResponse.vViewPopup,` && |\n| && ` controller: this,` && |\n| && @@ -271,6 +271,9 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. ` if (xml == '') { xml = '<mvc:View controllerName="z2ui5_controller" xmlns:mvc="sap.ui.core.mvc" />' };` && |\n| && |\n| && ` debugger;` && |\n| && + ` jQuery.sap.require("sap.ui.core.Fragment");` && |\n| && + ` jQuery.sap.require("sap.m.MessageToast");` && |\n| && + ` jQuery.sap.require("sap.m.MessageBox");` && |\n| && ` var oView = sap.ui.xmlview({viewContent:xml});` && |\n| && ` oView.getController().Roundtrip();` && |\n| && |\n| && diff --git a/src/z2ui5_cl_http_handler.clas.locals_imp.abap b/src/z2ui5_cl_http_handler.clas.locals_imp.abap index 19d3e9a9..01e4eb2c 100644 --- a/src/z2ui5_cl_http_handler.clas.locals_imp.abap +++ b/src/z2ui5_cl_http_handler.clas.locals_imp.abap @@ -23,7 +23,7 @@ CLASS z2ui5_lcl_utility DEFINITION INHERITING FROM cx_no_check. METHODS constructor IMPORTING val TYPE any OPTIONAL - previous LIKE previous OPTIONAL + previous TYPE REF TO cx_root OPTIONAL PREFERRED PARAMETER val. METHODS get_text REDEFINITION.