From 20b0c4c523253bf920c07e806a21afb548481bcf 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:39:37 +0100 Subject: [PATCH] js files as abap classes (#1623) * [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 | 1 + src/01/03/z2ui5_cl_app_app_js.clas.abap | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/webapp/controller/App.controller.js b/app/webapp/controller/App.controller.js index ee8f9415..60911e2b 100644 --- a/app/webapp/controller/App.controller.js +++ b/app/webapp/controller/App.controller.js @@ -207,6 +207,7 @@ sap.ui.define("z2ui5/Tree", ["sap/ui/core/Control"], (Control) => { z2ui5.onBeforeRoundtrip.push(this.setBackend.bind(this)); }, + renderer(oRm, oControl) { if (!z2ui5.treeState) return; setTimeout((id) => { z2ui5.oView.byId( id ).getBinding('items').setTreeState( z2ui5.treeState ); 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 c6ef231c..bd4af631 100644 --- a/src/01/03/z2ui5_cl_app_app_js.clas.abap +++ b/src/01/03/z2ui5_cl_app_app_js.clas.abap @@ -227,11 +227,10 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION. ` z2ui5.onBeforeRoundtrip.push(this.setBackend.bind(this));` && |\n| && ` },` && |\n| && `` && |\n| && - ` renderer(oRm, oControl) {` && |\n| && - ` setTimeout(() => {` && |\n| && - ` z2ui5.oView.byId( this.getProperty("tree_id") ).setTreeState( z2ui5.treeState );` && |\n| && - ` }, 100);` && |\n| && - ` }` && |\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| && ` });` && |\n| && `});` && |\n| && `` && |\n| && @@ -518,9 +517,9 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION. ` defaultValue: true` && |\n| && ` },` && |\n| && ` checkDirectUpload: {` && |\n| && + ` type: "boolean",` && |\n| && |\n|. result = result && - ` type: "boolean",` && |\n| && ` defaultValue: false` && |\n| && ` }` && |\n| && ` },` && |\n| &&