From 29b9072f4e317e2a3fdf85d0fc913527379d01c1 Mon Sep 17 00:00:00 2001 From: choper725 <129428114+choper725@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:51:42 +0200 Subject: [PATCH] add setTimeout for follow_up_action & update xml v (#1024) add setTimeout for follow_up_action, in order to finish set promises by controls. update xml view --- src/01/02/z2ui5_cl_core_http_get.clas.abap | 20 +++++++++++--------- src/02/01/01/z2ui5_cl_xml_view.clas.abap | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/01/02/z2ui5_cl_core_http_get.clas.abap b/src/01/02/z2ui5_cl_core_http_get.clas.abap index 9abcda0a..bab5a34b 100644 --- a/src/01/02/z2ui5_cl_core_http_get.clas.abap +++ b/src/01/02/z2ui5_cl_core_http_get.clas.abap @@ -385,15 +385,17 @@ CLASS Z2UI5_CL_CORE_HTTP_GET IMPLEMENTATION. ` if (sap.z2ui5.oResponse.PARAMS?.S_VIEW?.CHECK_DESTROY) {` && |\n| && ` sap.z2ui5.oController.ViewDestroy();` && |\n| && ` };` && |\n| && - ` if (sap.z2ui5.oResponse.PARAMS?.S_FOLLOW_UP_ACTION?.CUSTOM_JS){` && |\n| && - ` let mParams = sap.z2ui5.oResponse?.PARAMS.S_FOLLOW_UP_ACTION.CUSTOM_JS.split( "'");` && |\n| && - ` let mParamsEF = mParams.filter((val, index) => index % 2)` && |\n| && - ` if(mParamsEF.length) {` && |\n| && - ` sap.z2ui5.oController.eF.apply( undefined , mParamsEF);` && |\n| && - ` } else {` && |\n| && - ` Function("return " + mParams[0])();` && |\n| && - ` }` && |\n| && - ` }` && |\n| && + ` if(sap.z2ui5.oResponse.PARAMS?.S_FOLLOW_UP_ACTION?.CUSTOM_JS) {` && |\n| && + ` setTimeout(() => {` && |\n| && + ` let mParams = sap.z2ui5.oResponse?.PARAMS.S_FOLLOW_UP_ACTION.CUSTOM_JS.split("'");` && |\n| && + ` let mParamsEF = mParams.filter((val, index) => index % 2)` && |\n| && + ` if(mParamsEF.length) {` && |\n| && + ` sap.z2ui5.oController.eF.apply( undefined , mParamsEF);` && |\n| && + ` } else {` && |\n| && + ` Function("return " + mParams[0])();` && |\n| && + ` }` && |\n| && + ` },100);` && |\n| && + ` };` && |\n| && |\n| && ` sap.z2ui5.oController.showMessage('S_MSG_TOAST', sap.z2ui5.oResponse.PARAMS);` && |\n| && ` sap.z2ui5.oController.showMessage('S_MSG_BOX', sap.z2ui5.oResponse.PARAMS);` && |\n| && diff --git a/src/02/01/01/z2ui5_cl_xml_view.clas.abap b/src/02/01/01/z2ui5_cl_xml_view.clas.abap index 87c94313..7d35cff9 100644 --- a/src/02/01/01/z2ui5_cl_xml_view.clas.abap +++ b/src/02/01/01/z2ui5_cl_xml_view.clas.abap @@ -7706,7 +7706,7 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION. ( n = `fixedBottomRowCount` v = fixedBottomRowCount ) ( n = `minAutoRowCount` v = minAutoRowCount ) ( n = `visibleRowCount` v = visiblerowcount ) - ( n = `toggleopenstate` v = toggleopenstate ) + ( n = `toggleOpenState` v = toggleopenstate ) ( n = `visibleRowCountMode` v = visiblerowcountmode ) ) ). ENDMETHOD.