From e59657a851c005dbcfd0c3ec253127715b8d2a5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:37:39 +0100 Subject: [PATCH] js files as abap classes (#1622) * [create-pull-request] automated change * Update App.controller.js --------- Co-authored-by: oblomov-dev Co-authored-by: oblomov-dev <102328295+oblomov-dev@users.noreply.github.com> --- app/webapp/controller/App.controller.js | 9 ++++----- src/01/03/z2ui5_cl_app_app_js.clas.abap | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/webapp/controller/App.controller.js b/app/webapp/controller/App.controller.js index 498be1ae..ee8f9415 100644 --- a/app/webapp/controller/App.controller.js +++ b/app/webapp/controller/App.controller.js @@ -207,11 +207,10 @@ sap.ui.define("z2ui5/Tree", ["sap/ui/core/Control"], (Control) => { z2ui5.onBeforeRoundtrip.push(this.setBackend.bind(this)); }, - renderer(oRm, oControl) { - setTimeout(() => { - z2ui5.oView.byId( this.getProperty("tree_id") ).setTreeState( z2ui5.treeState ); - }, 100); - } + if (!z2ui5.treeState) return; + setTimeout((id) => { + z2ui5.oView.byId( id ).getBinding('items').setTreeState( z2ui5.treeState ); + }, 100, oControl.getProperty("tree_id") ); }); }); diff --git a/src/01/03/z2ui5_cl_app_app_js.clas.abap b/src/01/03/z2ui5_cl_app_app_js.clas.abap index 4f66edcf..c6ef231c 100644 --- a/src/01/03/z2ui5_cl_app_app_js.clas.abap +++ b/src/01/03/z2ui5_cl_app_app_js.clas.abap @@ -228,10 +228,9 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION. ` },` && |\n| && `` && |\n| && ` renderer(oRm, oControl) {` && |\n| && - ` if (!z2ui5.treeState) return;` && |\n| && - ` setTimeout((id) => {` && |\n| && - ` z2ui5.oView.byId( id ).getBinding('items').setTreeState( z2ui5.treeState );` && |\n| && - ` }, 100, oControl.getProperty("tree_id") );` && |\n| && + ` setTimeout(() => {` && |\n| && + ` z2ui5.oView.byId( this.getProperty("tree_id") ).setTreeState( z2ui5.treeState );` && |\n| && + ` }, 100);` && |\n| && ` }` && |\n| && ` });` && |\n| && `});` && |\n| &&