abaplint fixes (#276)

This commit is contained in:
oblomov 2023-06-16 10:55:26 +02:00 committed by GitHub
parent c3a327a3bd
commit 41547ee4a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 311 additions and 345 deletions

View File

@ -16,7 +16,7 @@
"rules": {
"7bit_ascii": false,
"abapdoc": false,
"align_parameters": false,
"align_parameters": true,
"allowed_object_naming": true,
"allowed_object_types": true,
"ambiguous_statement": true,
@ -45,7 +45,7 @@
"classic_exceptions_overlap": true,
"cloud_types": true,
"colon_missing_space": true,
"commented_code": false,
"commented_code": true,
"constant_classes": {
"exclude": [],
"severity": "Error",
@ -63,13 +63,13 @@
"severity": "Error",
"max": 20
},
"dangerous_statement": false,
"dangerous_statement": true,
"db_operation_in_loop": true,
"definitions_top": false,
"description_empty": true,
"double_space": true,
"downport": true,
"empty_line_in_statement": false,
"empty_line_in_statement": true,
"empty_statement": true,
"empty_structure": {
"loop": true,
@ -105,7 +105,7 @@
},
"global_class": true,
"identical_conditions": true,
"identical_contents": false,
"identical_contents": true,
"identical_descriptions": true,
"identical_form_names": true,
"if_in_if": true,
@ -114,12 +114,12 @@
"indentation": false,
"inline_data_old_versions": true,
"intf_referencing_clas": true,
"keep_single_parameter_on_one_line": false,
"keep_single_parameter_on_one_line": true,
"keyword_case": false,
"line_break_multiple_parameters": false,
"line_break_style": false,
"line_break_style": true,
"line_length": false,
"line_only_punc": false,
"line_only_punc": true,
"local_class_naming": false,
"local_testclass_consistency": true,
"local_variable_names": false,

View File

@ -56,7 +56,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
r_result = `<html>` && |\n| &&
`<head>` && |\n| &&
lv_sec_policy && |\n| &&
` <meta charset="UTF-8">` && |\n| &&
` <meta charset="UTF-8">` && |\n| &&
` <meta name="viewport" content="width=device-width, initial-scale=1.0">` && |\n| &&
` <meta http-equiv="X-UA-Compatible" content="IE=edge">` && |\n| &&
` <title>abap2UI5</title>` && |\n| &&
@ -77,207 +77,206 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
` <div id="content" data-handle-validation="true" ></div>` && |\n| &&
`</body>` && |\n| &&
`</html>` && |\n|.
r_result = r_result && `<abc/><script id="z2ui5">` && |\n| &&
` sap.ui.getCore().attachInit(function () {` && |\n| &&
` "use strict";` && |\n| &&
r_result = r_result && `<abc/><script id="z2ui5">` && |\n| &&
` sap.ui.getCore().attachInit(function () {` && |\n| &&
` "use strict";` && |\n| &&
|\n| &&
` sap.ui.controller("z2ui5_controller", {` && |\n| &&
` sap.ui.controller("z2ui5_controller", {` && |\n| &&
|\n| &&
` onAfterRendering: function () {` && |\n| &&
` sap.z2ui5.onAfter();` && |\n| &&
` },` && |\n| &&
` onEventFrontend: function (vAction) {` && |\n| &&
` onAfterRendering: function () {` && |\n| &&
` sap.z2ui5.onAfter();` && |\n| &&
` },` && |\n| &&
` onEventFrontend: function (vAction) {` && |\n| &&
|\n| &&
` if (vAction == 'POPUP_CLOSE') {` && |\n| &&
` if (sap.z2ui5.oResponse.oViewPopup.close) {` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.close();` && |\n| &&
` }` && |\n| &&
` if (vAction == 'POPUP_CLOSE') {` && |\n| &&
` if (sap.z2ui5.oResponse.oViewPopup.close) {` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.close();` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.destroy();` && |\n| &&
` delete sap.z2ui5.oResponse.oViewPopup;` && |\n| &&
` delete sap.z2ui5.oResponse.oSystem.VIEW_POPUP;` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
` delete sap.z2ui5.oResponse.oViewPopup;` && |\n| &&
` delete sap.z2ui5.oResponse.oSystem.VIEW_POPUP;` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
|\n| &&
` onEvent: function (oEvent) {` && |\n| &&
` onEvent: function (oEvent) {` && |\n| &&
|\n| &&
` if (!window.navigator.onLine) {` && |\n| &&
` if (!window.navigator.onLine) {` && |\n| &&
` sap.m.MessageBox.alert('No internet connection! Please reconnect to the server and try again.');` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
|\n| &&
` sap.ui.core.BusyIndicator.show();` && |\n| &&
` this.oBody = {};` && |\n| &&
` sap.ui.core.BusyIndicator.show();` && |\n| &&
` this.oBody = {};` && |\n| &&
|\n| &&
` if (sap.z2ui5.oResponse.oViewPopup) {` && |\n| &&
` if (sap.z2ui5.oResponse.oViewPopup) {` && |\n| &&
` this.oBody.oUpdate = sap.z2ui5.oResponse.oViewPopup.getModel().oData.oUpdate;` && |\n| &&
` if (sap.z2ui5.oResponse.oViewPopup.close) {` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.close();` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.oViewPopup.close) {` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.close();` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup.destroy();` && |\n| &&
` } else {` && |\n| &&
` this.oBody.oUpdate = sap.z2ui5.oView.getModel().oData.oUpdate;` && |\n| &&
` }` && |\n| &&
` } else {` && |\n| &&
` this.oBody.oUpdate = sap.z2ui5.oView.getModel().oData.oUpdate;` && |\n| &&
` }` && |\n| &&
|\n| &&
` if (sap.z2ui5.oResponse.PARAMS.T_SCROLL) {` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.T_SCROLL) {` && |\n| &&
` this.oBody.oScroll = sap.z2ui5.oResponse.PARAMS.T_SCROLL;` && |\n| &&
` this.oBody.oScroll.forEach(item => {` && |\n| &&
` try {` && |\n| &&
` item.VALUE = this.getView().byId(item.NAME).getScrollDelegate().getScrollTop();` && |\n| &&
` } catch (e) {` && |\n| &&
` try { ` && |\n| &&
` this.oBody.oScroll.forEach(item => {` && |\n| &&
` try {` && |\n| &&
` item.VALUE = this.getView().byId(item.NAME).getScrollDelegate().getScrollTop();` && |\n| &&
` } catch (e) {` && |\n| &&
` try { ` && |\n| &&
` var ele = '#' + this.getView().byId(item.NAME).getId() + '-inner';` && |\n| &&
` item.VALUE = $(ele).scrollTop();` && |\n| &&
` } catch (e) { }` && |\n| &&
` }` && |\n| &&
` });` && |\n| &&
` }` && |\n| &&
` this.oBody.ID = sap.z2ui5.oResponse.ID;` && |\n| &&
` this.oBody.ARGUMENTS = arguments;` && |\n| &&
` item.VALUE = $(ele).scrollTop();` && |\n| &&
` } catch (e) { }` && |\n| &&
` }` && |\n| &&
` });` && |\n| &&
` }` && |\n| &&
` this.oBody.ID = sap.z2ui5.oResponse.ID;` && |\n| &&
` this.oBody.ARGUMENTS = arguments;` && |\n| &&
|\n| &&
` if (sap.z2ui5.checkLogActive) {` && |\n| &&
` console.log('Request Object:');` && |\n| &&
` console.log(this.oBody);` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.checkLogActive) {` && |\n| &&
` console.log('Request Object:');` && |\n| &&
` console.log(this.oBody);` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponseOld = sap.z2ui5.oResponse;` && |\n| &&
` sap.z2ui5.oResponse = {};` && |\n| &&
` sap.z2ui5.oBody = this.oBody;` && |\n| &&
` sap.z2ui5.Roundtrip(oEvent.isHoldView);` && |\n| &&
` },` && |\n| &&
` Roundtrip: function (isHoldView) {` && |\n| &&
` sap.z2ui5.checkTimerActive = false;` && |\n| &&
` if (sap.z2ui5.oView ) { if (!isHoldView ) {` && |\n| &&
` sap.z2ui5.oView.destroy();` && |\n| &&
` } }` && |\n| &&
` var xhr = new XMLHttpRequest();` && |\n| &&
` xhr.open("POST", sap.z2ui5.pathname , true);` && |\n| &&
` xhr.onload = function (that) {` && |\n| &&
` sap.z2ui5.oResponse = {};` && |\n| &&
` sap.z2ui5.oBody = this.oBody;` && |\n| &&
` sap.z2ui5.Roundtrip(oEvent.isHoldView);` && |\n| &&
` },` && |\n| &&
` Roundtrip: function (isHoldView) {` && |\n| &&
` sap.z2ui5.checkTimerActive = false;` && |\n| &&
` if (sap.z2ui5.oView ) { if (!isHoldView ) {` && |\n| &&
` sap.z2ui5.oView.destroy();` && |\n| &&
` } }` && |\n| &&
` var xhr = new XMLHttpRequest();` && |\n| &&
` xhr.open("POST", sap.z2ui5.pathname , true);` && |\n| &&
` xhr.onload = function (that) {` && |\n| &&
|\n| &&
` if (that.target.status !== 200) {` && |\n| &&
` if (that.target.status !== 200) {` && |\n| &&
` document.write(that.target.response);` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponse = JSON.parse(that.target.response);` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponse = JSON.parse(that.target.response);` && |\n| &&
|\n| &&
` if (sap.z2ui5.checkLogActive) {` && |\n| &&
` console.log('Response Object:');` && |\n| &&
` console.log(sap.z2ui5.oResponse);` && |\n| &&
` if (sap.z2ui5.checkLogActive) {` && |\n| &&
` console.log('Response Object:');` && |\n| &&
` console.log(sap.z2ui5.oResponse);` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.XML_VIEW !== '' ) {` && |\n| &&
` console.log('UI5-XML-View:');` && |\n| &&
` console.log('UI5-XML-View:');` && |\n| &&
` console.log(sap.z2ui5.oResponse.PARAMS.XML_MAIN);` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.XML_POPUP !== '' ) {` && |\n| &&
` console.log('UI5-XML-Popup:');` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.XML_POPUP !== '' ) {` && |\n| &&
` console.log('UI5-XML-Popup:');` && |\n| &&
` console.log(sap.z2ui5.oResponse.PARAMS.XML_POPUP);` && |\n| &&
` }` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.S_MSG.CONTROL !== '' ) {` && |\n| &&
` sap.m[sap.z2ui5.oResponse.S_MSG.CONTROL][sap.z2ui5.oResponse.S_MSG.TYPE](sap.z2ui5.oResponse.S_MSG.TEXT);` && |\n| &&
` }` && |\n| &&
` }` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.S_MSG.CONTROL !== '' ) {` && |\n| &&
` sap.m[sap.z2ui5.oResponse.S_MSG.CONTROL][sap.z2ui5.oResponse.S_MSG.TYPE](sap.z2ui5.oResponse.S_MSG.TEXT);` && |\n| &&
` }` && |\n| &&
|\n| &&
` if (!sap.z2ui5.oResponse.PARAMS.XML_MAIN) {` && |\n| &&
` sap.z2ui5.onAfter();` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
` if (!sap.z2ui5.oResponse.PARAMS.XML_MAIN) {` && |\n| &&
` sap.z2ui5.onAfter();` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
|\n| &&
` var oModel = new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL);` && |\n| &&
` var oView = new sap.ui.core.mvc.XMLView.create({` && |\n| &&
` definition: sap.z2ui5.oResponse.PARAMS.XML_MAIN,` && |\n| &&
` }).then(oView => {` && |\n| &&
` oView.setModel(oModel);` && |\n| &&
` if (sap.z2ui5.oParent) { ` && |\n| &&
` var oView = new sap.ui.core.mvc.XMLView.create({` && |\n| &&
` definition: sap.z2ui5.oResponse.PARAMS.XML_MAIN,` && |\n| &&
` }).then(oView => {` && |\n| &&
` oView.setModel(oModel);` && |\n| &&
` if (sap.z2ui5.oParent) { ` && |\n| &&
` sap.z2ui5.oParent.removeAllPages(); ` && |\n| &&
` sap.z2ui5.oParent.insertPage( oView ); ` && |\n| &&
` }else{` && |\n| &&
` oView.placeAt("content")};` && |\n| &&
` sap.z2ui5.oView = oView;` && |\n| &&
` });` && |\n| &&
` }.bind(this);` && |\n| &&
` xhr.send(JSON.stringify(sap.z2ui5.oBody));` && |\n| &&
` },` && |\n| &&
` });` && |\n| &&
` sap.z2ui5.oParent.insertPage( oView ); ` && |\n| &&
` }else{` && |\n| &&
` oView.placeAt("content")};` && |\n| &&
` sap.z2ui5.oView = oView;` && |\n| &&
` });` && |\n| &&
` }.bind(this);` && |\n| &&
` xhr.send(JSON.stringify(sap.z2ui5.oBody));` && |\n| &&
` },` && |\n| &&
` });` && |\n| &&
|\n| &&
` if (!sap.z2ui5) {` && |\n| &&
` sap.z2ui5 = {};` && |\n| &&
` }` && |\n| &&
` if (!sap.z2ui5.pathname){ sap.z2ui5.pathname = window.location.pathname; }` && |\n| &&
` debugger;` && |\n| &&
` if (!sap.z2ui5) {` && |\n| &&
` sap.z2ui5 = {};` && |\n| &&
` }` && |\n| &&
` if (!sap.z2ui5.pathname){ sap.z2ui5.pathname = window.location.pathname; }` && |\n| &&
` debugger;` && |\n| &&
` var xml = atob('PA==') + 'mvc:View controllerName="z2ui5_controller" xmlns:mvc="sap.ui.core.mvc" /' + atob('Pg==');` && |\n| &&
` jQuery.sap.require("sap.ui.core.Fragment");` && |\n| &&
` jQuery.sap.require("sap.m.MessageToast");` && |\n| &&
` jQuery.sap.require("sap.m.MessageBox");` && |\n| &&
` jQuery.sap.require("sap.ui.model.json.JSONModel");` && |\n| &&
` var oView = sap.ui.xmlview({ viewContent: xml });` && |\n| &&
` sap.z2ui5.Roundtrip = oView.getController().Roundtrip;` && |\n| &&
` sap.z2ui5.oController = oView.getController();` && |\n| &&
` sap.z2ui5.Roundtrip(false);` && |\n| &&
` sap.z2ui5.onAfter = () => {` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.TITLE != "") {` && |\n| &&
` document.title = sap.z2ui5.oResponse.PARAMS.TITLE;` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.PATH != "") {` && |\n| &&
` jQuery.sap.require("sap.ui.core.Fragment");` && |\n| &&
` jQuery.sap.require("sap.m.MessageToast");` && |\n| &&
` jQuery.sap.require("sap.m.MessageBox");` && |\n| &&
` jQuery.sap.require("sap.ui.model.json.JSONModel");` && |\n| &&
` var oView = sap.ui.xmlview({ viewContent: xml });` && |\n| &&
` sap.z2ui5.Roundtrip = oView.getController().Roundtrip;` && |\n| &&
` sap.z2ui5.oController = oView.getController();` && |\n| &&
` sap.z2ui5.Roundtrip(false);` && |\n| &&
` sap.z2ui5.onAfter = () => {` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.TITLE != "") {` && |\n| &&
` document.title = sap.z2ui5.oResponse.PARAMS.TITLE;` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.PATH != "") {` && |\n| &&
` window.history.replaceState("", "", window.location.origin + sap.z2ui5.oResponse.PARAMS.PATH + window.location.search);` && |\n| &&
` }` && |\n| &&
` var oView = sap.z2ui5.oView;` && |\n| &&
` try {` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID !== '') {` && |\n| &&
` var ofocus = oView.byId(sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID).getFocusInfo();` && |\n| &&
` ofocus.cursorPos = parseInt(sap.z2ui5.oResponse.PARAMS.S_CURSOR.CURSORPOS);` && |\n| &&
` ofocus.selectionStart = parseInt(sap.z2ui5.oResponse.PARAMS.S_CURSOR.SELECTIONSTART);` && |\n| &&
` ofocus.selectionEnd = parseInt(sap.z2ui5.oResponse.PARAMS.S_CURSOR.SELECTIONEND);` && |\n| &&
` }` && |\n| &&
` oView.byId(sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID).applyFocusInfo(ofocus);` && |\n| &&
` } catch (error) { }` && |\n| &&
` ; try { } catch (error) { }` && |\n| &&
` ; if (sap.z2ui5.oResponse.PARAMS.T_SCROLL) {` && |\n| &&
` sap.z2ui5.oResponse.PARAMS.T_SCROLL.forEach(item => {` && |\n| &&
` try {` && |\n| &&
` }` && |\n| &&
` var oView = sap.z2ui5.oView;` && |\n| &&
` try {` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID !== '') {` && |\n| &&
` var ofocus = oView.byId(sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID).getFocusInfo();` && |\n| &&
` ofocus.cursorPos = parseInt(sap.z2ui5.oResponse.PARAMS.S_CURSOR.CURSORPOS);` && |\n| &&
` ofocus.selectionStart = parseInt(sap.z2ui5.oResponse.PARAMS.S_CURSOR.SELECTIONSTART);` && |\n| &&
` ofocus.selectionEnd = parseInt(sap.z2ui5.oResponse.PARAMS.S_CURSOR.SELECTIONEND);` && |\n| &&
` }` && |\n| &&
` oView.byId(sap.z2ui5.oResponse.PARAMS.S_CURSOR.ID).applyFocusInfo(ofocus);` && |\n| &&
` } catch (error) { }` && |\n| &&
` ; try { } catch (error) { }` && |\n| &&
` ; if (sap.z2ui5.oResponse.PARAMS.T_SCROLL) {` && |\n| &&
` sap.z2ui5.oResponse.PARAMS.T_SCROLL.forEach(item => {` && |\n| &&
` try {` && |\n| &&
` oView.byId(item.NAME).scrollTo(parseInt(item.VALUE));` && |\n| &&
` } catch (e) {` && |\n| &&
` try {` && |\n| &&
` var ele = '#' + oView.byId(item.NAME).getId() + '-inner';` && |\n| &&
` $(ele).scrollTop(item.VALUE);` && |\n| &&
` } catch ( e ) { }` && |\n| &&
` }` && |\n| &&
` }` && |\n| &&
` );` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.XML_POPUP) {` && |\n| &&
` sap.ui.core.Fragment.load({` && |\n| &&
` definition: sap.z2ui5.oResponse.PARAMS.XML_POPUP,` && |\n| &&
` controller: sap.z2ui5.oController,` && |\n| &&
` }).then(function (oFragment) {` && |\n| &&
` } catch (e) {` && |\n| &&
` try {` && |\n| &&
` var ele = '#' + oView.byId(item.NAME).getId() + '-inner';` && |\n| &&
` $(ele).scrollTop(item.VALUE);` && |\n| &&
` } catch ( e ) { }` && |\n| &&
` }` && |\n| &&
` }` && |\n| &&
` );` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.XML_POPUP) {` && |\n| &&
` sap.ui.core.Fragment.load({` && |\n| &&
` definition: sap.z2ui5.oResponse.PARAMS.XML_POPUP,` && |\n| &&
` controller: sap.z2ui5.oController,` && |\n| &&
` }).then(function (oFragment) {` && |\n| &&
` oFragment.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL.oViewModel))` && |\n| &&
` sap.z2ui5.oView.addDependent(oFragment);` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.POPOVER_OPEN_BY_ID == '' ) {` && |\n| &&
` oFragment.open();` && |\n| &&
` } else {` && |\n| &&
` var oControl = sap.ui.getCore().byId(sap.z2ui5.oResponse.PARAMS.POPOVER_OPEN_BY_ID);` && |\n| &&
` if (oControl === undefined) {` && |\n| &&
` oControl = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS.POPOVER_OPEN_BY_ID);` && |\n| &&
` }` && |\n| &&
` oFragment.openBy(oControl);` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup = oFragment;` && |\n| &&
` sap.ui.core.BusyIndicator.hide();` && |\n| &&
` }` && |\n| &&
` .bind(this));` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.S_TIMER.INTERVAL_MS !== '' ) {` && |\n| &&
` sap.z2ui5.oView.addDependent(oFragment);` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.POPOVER_OPEN_BY_ID == '' ) {` && |\n| &&
` oFragment.open();` && |\n| &&
` } else {` && |\n| &&
` var oControl = sap.ui.getCore().byId(sap.z2ui5.oResponse.PARAMS.POPOVER_OPEN_BY_ID);` && |\n| &&
` if (oControl === undefined) {` && |\n| &&
` oControl = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS.POPOVER_OPEN_BY_ID);` && |\n| &&
` }` && |\n| &&
` oFragment.openBy(oControl);` && |\n| &&
` }` && |\n| &&
` sap.z2ui5.oResponse.oViewPopup = oFragment;` && |\n| &&
` sap.ui.core.BusyIndicator.hide();` && |\n| &&
` }` && |\n| &&
` .bind(this));` && |\n| &&
` }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS.S_TIMER.INTERVAL_MS !== '' ) {` && |\n| &&
` var oEvent = { 'EVENT': 'BUTTON_CHECK', 'METHOD': 'UPDATE' };` && |\n| &&
` oEvent.EVENT = sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED;` && |\n| &&
` sap.z2ui5.checkTimerActive = true;` && |\n| &&
` setTimeout(() => {` && |\n| &&
` if (sap.z2ui5.checkTimerActive) {` && |\n| &&
` sap.z2ui5.oView.getController().onEvent(oEvent);` && |\n| &&
` }` && |\n| &&
` }, parseInt(sap.z2ui5.oResponse.PARAMS.S_TIMER.INTERVAL_MS), oEvent);` && |\n| &&
` }` && |\n| &&
` sap.ui.core.BusyIndicator.hide();` && |\n| &&
` oEvent.EVENT = sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED;` && |\n| &&
` sap.z2ui5.checkTimerActive = true;` && |\n| &&
` setTimeout(() => {` && |\n| &&
` if (sap.z2ui5.checkTimerActive) {` && |\n| &&
` sap.z2ui5.oView.getController().onEvent(oEvent);` && |\n| &&
` }` && |\n| &&
` }, parseInt(sap.z2ui5.oResponse.PARAMS.S_TIMER.INTERVAL_MS), oEvent);` && |\n| &&
` }` && |\n| &&
` sap.ui.core.BusyIndicator.hide();` && |\n| &&
` };` &&
` sap.z2ui5.checkLogActive = ` && z2ui5_lcl_utility=>get_json_boolean( check_logging ) && `;` && |\n| &&
` });` && |\n| &&
`</script><abc/>` && |\n| &&
` sap.z2ui5.checkLogActive = ` && z2ui5_lcl_utility=>get_json_boolean( check_logging ) && `;` && |\n| &&
` });` && |\n| &&
`</script><abc/>` && |\n| &&
`</html>`.
ENDMETHOD.

View File

@ -208,7 +208,7 @@ CLASS z2ui5_lcl_utility IMPLEMENTATION.
DELETE lt_attri WHERE visibility <> cl_abap_classdescr=>public.
LOOP AT lt_attri INTO DATA(ls_attri)
WHERE type_kind = cl_abap_classdescr=>typekind_struct2
WHERE type_kind = cl_abap_classdescr=>typekind_struct2
OR type_kind = cl_abap_classdescr=>typekind_struct1.
DELETE lt_attri INDEX sy-tabix.
@ -809,10 +809,10 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION.
DATA(lv_xml_error) = `<mvc:View controllerName="z2ui5_controller" displayBlock="true" height="100%" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:f="sap.ui.layout.form" xmlns:mvc="sap.ui.core.mv` &&
`c" xmlns:editor="sap.ui.codeeditor" xmlns:ui="sap.ui.table" xmlns="sap.m" xmlns:uxap="sap.uxap" xmlns:mchart="sap.suite.ui.microchart" xmlns:z2ui5="z2ui5" xmlns:webc="sap.ui.webc.main" xmlns:text="sap.ui.richtexteditor" > <Shell> <MessagePage ` && |\n|
&&
` description="` && lv_descr && `" ` && |\n| &&
` description="` && lv_descr && `" ` && |\n| &&
` icon="sap-icon://message-error" ` && |\n| &&
` text="500 Internal Server Error" ` && |\n| &&
` enableFormattedText="true" ` && |\n| &&
` enableFormattedText="true" ` && |\n| &&
` > <buttons ` && |\n| &&
` > <Button ` && |\n| &&
` press="` && client->_event( `BUTTON_HOME` ) && `" ` && |\n| &&
@ -845,52 +845,52 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION.
`" xmlns:editor="sap.ui.codeeditor" xmlns:ui="sap.ui.table" xmlns="sap.m" xmlns:uxap="sap.uxap" xmlns:mchart="sap.suite.ui.microchart" xmlns:z2ui5="z2ui5" xmlns:webc="sap.ui.webc.main" xmlns:text="sap.ui.richtexteditor" > <Shell> <Page ` && |\n| &&
` showNavButton="false" ` && |\n| &&
` class="sapUiContentPadding sapUiResponsivePadding--subHeader sapUiResponsivePadding--content sapUiResponsivePadding--footer" ` && |\n| &&
` > <headerContent ` && |\n| &&
` > <Title ` && |\n| &&
` /> <Title ` && |\n| &&
` > <headerContent ` && |\n| &&
` > <Title ` && |\n| &&
` /> <Title ` && |\n| &&
` text="abap2UI5 - Developing UI5 Apps in pure ABAP" ` && |\n| &&
` /> <ToolbarSpacer ` && |\n| &&
` /> <Link ` && |\n| &&
` text="SCN" ` && |\n| &&
` target="_blank" ` && |\n| &&
` /> <Link ` && |\n| &&
` text="SCN" ` && |\n| &&
` target="_blank" ` && |\n| &&
` href="https://blogs.sap.com/tag/abap2ui5/" ` && |\n| &&
` /> <Link ` && |\n| &&
` /> <Link ` && |\n| &&
` text="Twitter" ` && |\n| &&
` target="_blank" ` && |\n| &&
` href="https://twitter.com/OblomovDev" ` && |\n| &&
` /> <Link ` && |\n| &&
` target="_blank" ` && |\n| &&
` href="https://twitter.com/OblomovDev" ` && |\n| &&
` /> <Link ` && |\n| &&
` text="GitHub" ` && |\n| &&
` target="_blank" ` && |\n| &&
` target="_blank" ` && |\n| &&
` href="https://github.com/oblomov-dev/abap2ui5" ` && |\n| &&
` /></headerContent>`.
lv_xml_main = lv_xml_main && ` <l:Grid ` && |\n| &&
` defaultSpan="XL7 L7 M12 S12" ` && |\n| &&
` > <l:content ` && |\n| &&
` > <f:SimpleForm ` && |\n| &&
` title="Quick Start" ` && |\n| &&
` layout="ResponsiveGridLayout" ` && |\n| &&
` > <l:content ` && |\n| &&
` > <f:SimpleForm ` && |\n| &&
` title="Quick Start" ` && |\n| &&
` layout="ResponsiveGridLayout" ` && |\n| &&
` editable="true" ` && |\n| &&
` > <f:content ` && |\n| &&
` > <Label ` && |\n| &&
` text="Step 1" ` && |\n| &&
` /> <Text ` && |\n| &&
` > <f:content ` && |\n| &&
` > <Label ` && |\n| &&
` text="Step 1" ` && |\n| &&
` /> <Text ` && |\n| &&
` text="Create a global class in your abap system" ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 2" ` && |\n| &&
` /> <Text ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 2" ` && |\n| &&
` /> <Text ` && |\n| &&
` text="Add the interface: Z2UI5_IF_APP" ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 3" ` && |\n| &&
` /> <Text ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 3" ` && |\n| &&
` /> <Text ` && |\n| &&
" TODO: check spelling: behaviour (BE) -> behavior (ABAP cleaner)
` text="Define view, implement behaviour" ` && |\n| &&
` /> <Link ` && |\n| &&
` text="Define view, implement behaviour" ` && |\n| &&
` /> <Link ` && |\n| &&
` text="(Example)" ` && |\n| &&
` target="_blank" ` && |\n| &&
` href="https://github.com/oblomov-dev/ABAP2UI5/blob/main/src/z2ui5_cl_app_hello_world.clas.abap" ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 4" ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 4" ` && |\n| &&
` /> `.
IF ms_home-class_editable = abap_true.
@ -909,9 +909,9 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION.
` press="` && client->_event( ms_home-btn_event_id ) && `" ` && |\n| &&
` text="` && ms_home-btn_text && `" ` && |\n| &&
` icon="` && ms_home-btn_icon && `" ` && |\n| &&
` /> <Label ` && |\n| &&
` /> <Label ` && |\n| &&
` text="Step 5" ` && |\n| &&
` /> <Link ` && |\n| &&
` /> <Link ` && |\n| &&
` text="Link to the Application" ` && |\n| &&
` target="_blank" ` && |\n| &&
` href="` && escape( val = lv_link format = cl_abap_format=>e_xml_attr ) && `" ` && |\n| &&
@ -919,7 +919,7 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION.
` /></f:content></f:SimpleForm>`.
lv_xml_main = lv_xml_main && `<f:SimpleForm ` && |\n| &&
` title="Demo Section" ` && |\n| &&
` title="Demo Section" ` && |\n| &&
` layout="ResponsiveGridLayout" ` && |\n| &&
` >`.
@ -1052,7 +1052,7 @@ CLASS z2ui5_lcl_fw_handler IMPLEMENTATION.
DATA(lv_viewmodel) = COND #( WHEN ms_next-s_set-_viewmodel IS NOT INITIAL
THEN ms_next-s_set-_viewmodel
ELSE bind_back_2_front( lo_app = ms_db-o_app t_attri = ms_db-t_attri ) ).
lo_resp->add_attribute( n = `OVIEWMODEL` v = lv_viewmodel apos_active = abap_false ).
lo_resp->add_attribute( n = `OVIEWMODEL` v = lv_viewmodel apos_active = abap_false ).
CLEAR ms_next-s_set-_viewmodel.
lo_resp->add_attribute( n = `PARAMS` v = z2ui5_lcl_utility=>trans_any_2_json( ms_next-s_set ) apos_active = abap_false ).
@ -1106,7 +1106,7 @@ CLASS z2ui5_lcl_fw_handler IMPLEMENTATION.
CASE lr_attri->type_kind.
WHEN 'D' OR 'T'.
/ui2/cl_json=>deserialize( EXPORTING json = `"` && <frontend> && `"`
CHANGING data = <backend> ).
CHANGING data = <backend> ).
WHEN OTHERS.
<backend> = <frontend>.
ENDCASE.

View File

@ -68,8 +68,7 @@ CLASS ltcl_unit_01_json IMPLEMENTATION.
METHOD test_json_object.
DATA(lo_tree) = NEW z2ui5_lcl_utility_tree_json( ).
lo_tree->add_attribute_object( `CCC`
)->add_attribute( n = `AAA` v = `BBB` ).
lo_tree->add_attribute_object( `CCC` )->add_attribute( n = `AAA` v = `BBB` ).
DATA(lv_result) = lo_tree->stringify( ).
IF `{"CCC":{"AAA":"BBB"}}` <> lv_result.
@ -88,8 +87,7 @@ CLASS ltcl_unit_01_json IMPLEMENTATION.
DATA(ls_test) = VALUE ty_S_test( comp1 = `AAA` comp2 = `BBB` ).
lo_tree->add_attribute_object( `CCC`
)->add_attribute_struc( ls_test ).
lo_tree->add_attribute_object( `CCC` )->add_attribute_struc( ls_test ).
DATA(lv_result) = lo_tree->stringify( ).
IF `{"CCC":{"COMP1":"AAA","COMP2":"BBB"}}` <> lv_result.
@ -106,7 +104,7 @@ CLASS ltcl_unit_01_json IMPLEMENTATION.
END OF ty_row.
TYPES ty_t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY.
DATA(lt_tab) = VALUE ty_t_tab( ( title = 'Test' value = 'this is a description' selected = abap_true )
DATA(lt_tab) = VALUE ty_t_tab( ( title = 'Test' value = 'this is a description' selected = abap_true )
( title = 'Test2' value = 'this is a new descr' selected = abap_false ) ).
DATA(lt_tab2) = VALUE ty_t_tab( ).
@ -130,7 +128,7 @@ CLASS ltcl_unit_01_json IMPLEMENTATION.
END OF ty_row.
TYPES ty_t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY.
DATA(lt_tab) = VALUE ty_t_tab( ( title = 'Test' value = 'this is a description' selected = abap_true )
DATA(lt_tab) = VALUE ty_t_tab( ( title = 'Test' value = 'this is a description' selected = abap_true )
( title = 'Test2' value = 'this is a new descr' selected = abap_false ) ).
DATA(lt_tab2) = VALUE ty_t_tab( ).
@ -153,20 +151,7 @@ ENDCLASS.
CLASS ltcl_unit_01_utility IMPLEMENTATION.
METHOD test_util_04_attri_by_ref.
* DATA(lo_app) = NEW ltcl_unit_04_deep_data( ).
*
* DATA(lt_attri) = z2ui5_lcl_utility=>get_t_attri_by_ref( lo_app ).
*
* DATA(lt_test) = VALUE z2ui5_lcl_utility=>ty_t_attri(
*( name = `Z2UI5_IF_APP~ID` type_kind = `g` type = `STRING` bind_type = `` data_stringify = `` gen_type_kind = `` gen_type = `` gen_kind = `` )
*( name = `CHECK_INITIALIZED` type_kind = `C` type = `ABAP_BOOL` bind_type = `` data_stringify = `` gen_type_kind = `` gen_type = `` gen_kind = `` )
*( name = `SV_STATUS` type_kind = `g` type = `STRING` bind_type = `` data_stringify = `` gen_type_kind = `` gen_type = `` gen_kind = `` )
*( name = `T_TAB` type_kind = `h` type = `` bind_type = `` data_stringify = `` gen_type_kind = `` gen_type = `` gen_kind = `` )
* ).
*
* IF lt_test <> lt_attri.
* cl_abap_unit_assert=>fail( msg = 'utility - get t_attri table wrong' quit = 5 ).
* ENDIF.
ENDMETHOD.
METHOD test_util_uuid_session.
@ -273,7 +258,7 @@ CLASS ltcl_unit_02_app_start IMPLEMENTATION.
WHEN 'BUTTON_POST'.
client->popup_message_toast( |{ product } { quantity } - send to the server| ).
WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ).
client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ).
ENDCASE.
IF sv_state = 'TEST_MESSAGE_BOX'.
@ -422,10 +407,9 @@ CLASS ltcl_unit_02_app_start IMPLEMENTATION.
ENDMETHOD.
METHOD test_bind_one_way.
z2ui5_cl_http_handler=>client = VALUE #(
t_header = VALUE #( ( name = '~path_info' value = 'LTCL_UNIT_02_APP_START' ) )
" t_param = VALUE #( ( name = 'app' value = 'LTCL_UNIT_02_APP_START' ) )
).
t_header = VALUE #( ( name = '~path_info' value = 'LTCL_UNIT_02_APP_START' ) ) ).
sv_state = `TEST_ONE_WAY`.
DATA(lv_response) = z2ui5_cl_http_handler=>http_post( ).
@ -612,28 +596,9 @@ CLASS ltcl_unit_02_app_start IMPLEMENTATION.
/ui2/cl_json=>deserialize( EXPORTING json = lv_response
CHANGING data = lo_data ).
" FIELD-SYMBOLS <val> TYPE any.
* UNASSIGN <val>.
* DATA(lv_assign) = `OMESSAGE->CONTROL->*`.
* ASSIGN lo_data->(lv_assign) TO <val>.
* IF <val> <> `MessageBox`.
* cl_abap_unit_assert=>fail( msg = 'message box - control wrong' quit = 5 ).
* ENDIF.
*
* UNASSIGN <val>.
* lv_assign = `OMESSAGE->TEXT->*`.
* ASSIGN lo_data->(lv_assign) TO <val>.
* IF <val> <> `test message box`.
* cl_abap_unit_assert=>fail( msg = 'message box - text wrong' quit = 5 ).
* ENDIF.
*
* UNASSIGN <val>.
* lv_assign = `OMESSAGE->TYPE->*`.
* ASSIGN lo_data->(lv_assign) TO <val>.
* IF <val> <> `information`.
* cl_abap_unit_assert=>fail( msg = 'message box - type wrong' quit = 5 ).
* ENDIF.
ENDMETHOD.
METHOD test_startup_path.
@ -647,7 +612,7 @@ CLASS ltcl_unit_02_app_start IMPLEMENTATION.
/ui2/cl_json=>deserialize( EXPORTING json = lv_response
CHANGING data = lo_data ).
" FIELD-SYMBOLS <val> TYPE any.
ENDMETHOD.
METHOD test_navigate.
@ -661,7 +626,7 @@ CLASS ltcl_unit_02_app_start IMPLEMENTATION.
/ui2/cl_json=>deserialize( EXPORTING json = lv_response
CHANGING data = lo_data ).
" FIELD-SYMBOLS <val> TYPE any.
ENDMETHOD.
ENDCLASS.
@ -700,7 +665,7 @@ CLASS ltcl_unit_03_app_ajax IMPLEMENTATION.
WHEN 'BUTTON_POST'.
client->popup_message_toast( |{ product } { quantity } - send to the server| ).
WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ).
client->nav_app_leave( client->get_app( client->get( )-id_prev_app_stack ) ).
ENDCASE.
IF sv_state = 'ERROR'.

View File

@ -872,68 +872,68 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
ENDMETHOD.
METHOD cc_file_uploader_get_js.
result = ` jQuery.sap.declare("z2ui5.FileUploader");` && |\n| &&
result = ` jQuery.sap.declare("z2ui5.FileUploader");` && |\n| &&
|\n| &&
` sap.ui.define([` && |\n| &&
` "sap/ui/core/Control",` && |\n| &&
` "sap/m/Button",` && |\n| &&
` "sap/ui/unified/FileUploader"` && |\n| &&
` sap.ui.define([` && |\n| &&
` "sap/ui/core/Control",` && |\n| &&
` "sap/m/Button",` && |\n| &&
` "sap/ui/unified/FileUploader"` && |\n| &&
` ], function (Control, Button, FileUploader) {` && |\n| &&
` "use strict";` && |\n| &&
` "use strict";` && |\n| &&
|\n| &&
` return Control.extend("z2ui5.FileUploader", {` && |\n| &&
` return Control.extend("z2ui5.FileUploader", {` && |\n| &&
|\n| &&
` metadata: {` && |\n| &&
` properties: {` && |\n| &&
` value: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` path: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` tooltip: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` fileType: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` placeholder: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` buttonText: {` && |\n| &&
` type: "string",` && |\n| &&
` metadata: {` && |\n| &&
` properties: {` && |\n| &&
` value: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` path: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` tooltip: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` fileType: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` placeholder: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: ""` && |\n| &&
` },` && |\n| &&
` buttonText: {` && |\n| &&
` type: "string",` && |\n| &&
` defaultValue: "Upload"` && |\n| &&
` },` && |\n| &&
` enabled: {` && |\n| &&
` type: "boolean",` && |\n| &&
` defaultValue: true` && |\n| &&
` },` && |\n| &&
` multiple: {` && |\n| &&
` type: "boolean",` && |\n| &&
` defaultValue: false` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
` },` && |\n| &&
` enabled: {` && |\n| &&
` type: "boolean",` && |\n| &&
` defaultValue: true` && |\n| &&
` },` && |\n| &&
` multiple: {` && |\n| &&
` type: "boolean",` && |\n| &&
` defaultValue: false` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
|\n| &&
|\n| &&
` aggregations: {` && |\n| &&
` },` && |\n| &&
` events: {` && |\n| &&
` "upload": {` && |\n| &&
` allowPreventDefault: true,` && |\n| &&
` parameters: {}` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
` renderer: null` && |\n| &&
` },` && |\n| &&
` aggregations: {` && |\n| &&
` },` && |\n| &&
` events: {` && |\n| &&
` "upload": {` && |\n| &&
` allowPreventDefault: true,` && |\n| &&
` parameters: {}` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
` renderer: null` && |\n| &&
` },` && |\n| &&
|\n| &&
` renderer: function (oRm, oControl) {` && |\n| &&
` renderer: function (oRm, oControl) {` && |\n| &&
|\n| &&
` oControl.oUploadButton = new Button({` && |\n| &&
` oControl.oUploadButton = new Button({` && |\n| &&
` text: oControl.getProperty("buttonText"),` && |\n| &&
` enabled: oControl.getProperty("path") !== "",` && |\n| &&
` press: function (oEvent) {` && |\n| &&
@ -941,41 +941,41 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
` this.setProperty("path", this.oFileUploader.getProperty("value"));` && |\n| &&
|\n| &&
` var file = this.oFileUploader.oFileUpload.files[0];` && |\n| &&
` var reader = new FileReader();` && |\n| &&
` var reader = new FileReader();` && |\n| &&
|\n| &&
` reader.onload = function (evt) {` && |\n| &&
` reader.onload = function (evt) {` && |\n| &&
` var vContent = evt.currentTarget.result;` && |\n| &&
` this.setProperty("value", vContent);` && |\n| &&
` this.fireUpload();` && |\n| &&
` //this.getView().byId('picture' ).getDomRef().src = vContent;` && |\n| &&
` }.bind(this)` && |\n| &&
` }.bind(this)` && |\n| &&
|\n| &&
` reader.readAsDataURL(file);` && |\n| &&
` }.bind(oControl)` && |\n| &&
` });` && |\n| &&
` reader.readAsDataURL(file);` && |\n| &&
` }.bind(oControl)` && |\n| &&
` });` && |\n| &&
|\n| &&
` oControl.oFileUploader = new FileUploader({` && |\n| &&
` icon: "sap-icon://browse-folder",` && |\n| &&
` iconOnly: true,` && |\n| &&
` value: oControl.getProperty("path"),` && |\n| &&
` placeholder: oControl.getProperty("placeholder"),` && |\n| &&
` change: function (oEvent) {` && |\n| &&
` oControl.oFileUploader = new FileUploader({` && |\n| &&
` icon: "sap-icon://browse-folder",` && |\n| &&
` iconOnly: true,` && |\n| &&
` value: oControl.getProperty("path"),` && |\n| &&
` placeholder: oControl.getProperty("placeholder"),` && |\n| &&
` change: function (oEvent) {` && |\n| &&
` var value = oEvent.getSource().getProperty("value");` && |\n| &&
` this.setProperty("path", value);` && |\n| &&
` if (value) {` && |\n| &&
` this.oUploadButton.setEnabled();` && |\n| &&
` } else {` && |\n| &&
` this.setProperty("path", value);` && |\n| &&
` if (value) {` && |\n| &&
` this.oUploadButton.setEnabled();` && |\n| &&
` } else {` && |\n| &&
` this.oUploadButton.setEnabled(false);` && |\n| &&
` }` && |\n| &&
` this.oUploadButton.rerender();` && |\n| &&
` }.bind(oControl)` && |\n| &&
` });` && |\n| &&
` }` && |\n| &&
` this.oUploadButton.rerender();` && |\n| &&
` }.bind(oControl)` && |\n| &&
` });` && |\n| &&
|\n| &&
` var hbox = new sap.m.HBox();` && |\n| &&
` hbox.addItem(oControl.oFileUploader);` && |\n| &&
` hbox.addItem(oControl.oUploadButton);` && |\n| &&
` oRm.renderControl(hbox);` && |\n| &&
` }` && |\n| &&
` var hbox = new sap.m.HBox();` && |\n| &&
` hbox.addItem(oControl.oFileUploader);` && |\n| &&
` hbox.addItem(oControl.oUploadButton);` && |\n| &&
` oRm.renderControl(hbox);` && |\n| &&
` }` && |\n| &&
` });` && |\n| &&
` });`.
ENDMETHOD.
@ -1092,7 +1092,7 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
METHOD carousel.
result = _generic( name = `Carousel`
t_prop = VALUE #( ( n = `loop` v = lcl_utility=>get_json_boolean( loop ) )
t_prop = VALUE #( ( n = `loop` v = lcl_utility=>get_json_boolean( loop ) )
( n = `class` v = class )
( n = `height` v = height )
) ).
@ -1278,11 +1278,13 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
METHOD hlp_get_source_code_url.
DATA(lv_url) = z2ui5_cl_http_handler=>client-t_header[ name = `referer` ]-value.
" TODO: variable is assigned but never used (ABAP cleaner)
SPLIT lv_url AT '?' INTO lv_url DATA(lv_dummy).
result = z2ui5_cl_http_handler=>client-t_header[ name = `origin` ]-value && `/sap/bc/adt/oo/classes/` && lcl_utility=>get_classname_by_ref(
app ) && `/source/main`.
result = z2ui5_cl_http_handler=>client-t_header[ name = `origin` ]-value &&
`/sap/bc/adt/oo/classes/` && lcl_utility=>get_classname_by_ref( app ) &&
`/source/main`.
ENDMETHOD.
METHOD hlp_replace_controller_name.
@ -1675,7 +1677,7 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
( n = `width` v = width )
( n = `vertical` v = lcl_utility=>get_json_boolean( vertical ) )
( n = `horizontal` v = lcl_utility=>get_json_boolean( horizontal ) )
( n = `focusable` v = lcl_utility=>get_json_boolean( focusable ) ) ) ).
( n = `focusable` v = lcl_utility=>get_json_boolean( focusable ) ) ) ).
ENDMETHOD.
METHOD search_field.