Skip to content

Commit

Permalink
Launchpad fix (abap2UI5#1448)
Browse files Browse the repository at this point in the history
* launchpad fix

* fix scroling cc
  • Loading branch information
oblomov-dev authored Sep 24, 2024
1 parent e9007c0 commit a11bad5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
26 changes: 8 additions & 18 deletions src/01/02/z2ui5_cl_core_ui5_app.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,14 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.

result = ` sap.ui.define(["sap/ui/core/mvc/Controller", "z2ui5/controller/View1.controller", "sap/ui/core/BusyIndicator" , "z2ui5/cc/DebugTool" ], function(BaseController, Controller, BusyIndicator, DebugTool){` && |\n| &&
` return BaseController.extend("z2ui5.controller.App", {` && |\n| &&
` onInit: function(){` && |\n| &&
` onInit: async function(){` && |\n| &&
` BusyIndicator.show();` && |\n| &&
` ` && |\n| &&
` try {` && |\n| &&
` sap.z2ui5.oLaunchpadService = await this.getOwnerComponent().getService("ShellUIService"); ` && |\n| &&
` } catch (e) {} ` && |\n| &&
` try { ` && |\n| &&
` sap.z2ui5.startupParameters = this.getOwnerComponent().getComponentData().startupParameters; ` && |\n| &&
` } catch (e) {} ` && |\n| &&
` sap.z2ui5.oController = new Controller();` && |\n| &&
` sap.z2ui5.oControllerNest = new Controller();` && |\n| &&
` sap.z2ui5.oControllerNest2 = new Controller();` && |\n| &&
Expand Down Expand Up @@ -206,8 +211,7 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.
` BusyIndicator.hide();` && |\n| &&
` sap.z2ui5.isBusy = false;` && |\n| &&
` return;` && |\n| &&
` }` && |\n| &&
|\n| &&
` }` && |\n| &&
` const { S_POPUP, S_VIEW_NEST, S_VIEW_NEST2, S_POPOVER } = sap.z2ui5.oResponse.PARAMS;` && |\n| &&
` if (S_POPUP?.CHECK_DESTROY) {` && |\n| &&
` sap.z2ui5.oController.PopupDestroy();` && |\n| &&
Expand Down Expand Up @@ -254,30 +258,26 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.
` })` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
|\n| &&
` async displayFragment(xml, viewProp) {` && |\n| &&
` let oview_model = new JSONModel(sap.z2ui5.oResponse.OVIEWMODEL);` && |\n| &&
` const oFragment = await Fragment.load({` && |\n| &&
` definition: xml,` && |\n| &&
` controller: sap.z2ui5.oControllerPopup,` && |\n| &&
` id: "popupId"` && |\n| &&
` });` && |\n| &&
` // oview_model.setSizeLimit(sap.z2ui5.JSON_MODEL_LIMIT);` && |\n| &&
` oFragment.setModel(oview_model);` && |\n| &&
` sap.z2ui5[viewProp] = oFragment;` && |\n| &&
` sap.z2ui5[viewProp].Fragment = Fragment;` && |\n| &&
` oFragment.open();` && |\n| &&
` },` && |\n| &&
` async displayPopover(xml, viewProp, openById) {` && |\n| &&
` // let sapUiCore = sap.ui.require('sap/ui/core/Core');` && |\n| &&
` sap.ui.require(["sap/ui/core/Element"], async function (Element) {` && |\n| &&
` const oFragment = await Fragment.load({` && |\n| &&
` definition: xml,` && |\n| &&
` controller: sap.z2ui5.oControllerPopover,` && |\n| &&
` id: "popoverId"` && |\n| &&
` });` && |\n| &&
` let oview_model = new JSONModel(sap.z2ui5.oResponse.OVIEWMODEL);` && |\n| &&
` // oview_model.setSizeLimit(sap.z2ui5.JSON_MODEL_LIMIT);` && |\n| &&
` oFragment.setModel(oview_model);` && |\n| &&
` sap.z2ui5[viewProp] = oFragment;` && |\n| &&
` sap.z2ui5[viewProp].Fragment = Fragment;` && |\n| &&
Expand Down Expand Up @@ -308,7 +308,6 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.
` controller: sap.z2ui5.oControllerNest,` && |\n| &&
` preprocessors: { xml: { models: { template: oview_model } } }` && |\n| &&
` });` && |\n| &&
` // oview_model.setSizeLimit(sap.z2ui5.JSON_MODEL_LIMIT);` && |\n| &&
` oView.setModel(oview_model);` && |\n| &&
` let oParent = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS[viewNestId].ID);` && |\n| &&
` if (oParent) {` && |\n| &&
Expand All @@ -326,7 +325,6 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.
` controller: sap.z2ui5.oControllerNest2,` && |\n| &&
` preprocessors: { xml: { models: { template: oview_model } } }` && |\n| &&
` });` && |\n| &&
` // oview_model.setSizeLimit(sap.z2ui5.JSON_MODEL_LIMIT);` && |\n| &&
` oView.setModel(oview_model);` && |\n| &&
` let oParent = sap.z2ui5.oView.byId(sap.z2ui5.oResponse.PARAMS[viewNestId].ID);` && |\n| &&
` if (oParent) {` && |\n| &&
Expand Down Expand Up @@ -523,7 +521,6 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.
` if (sap.z2ui5.oResponse.PARAMS == undefined) { return; }` && |\n| &&
` if (sap.z2ui5.oResponse.PARAMS[paramKey]?.CHECK_UPDATE_MODEL) {` && |\n| &&
` let model = new JSONModel(sap.z2ui5.oResponse.OVIEWMODEL);` && |\n| &&
` // model.setSizeLimit(sap.z2ui5.JSON_MODEL_LIMIT);` && |\n| &&
` if (oView) { oView.setModel(model); }` && |\n| &&
` }` && |\n| &&
` },` && |\n| &&
Expand Down Expand Up @@ -630,16 +627,9 @@ CLASS z2ui5_cl_core_ui5_app IMPLEMENTATION.
` preprocessors: { xml: { models: { template: oview_model } } }` && |\n| &&
` });` && |\n| &&
` sap.z2ui5.oView.setModel(sap.z2ui5.oDeviceModel, "device");` && |\n| &&
` // if (sap.z2ui5.oParent) {` && |\n| &&
` // sap.z2ui5.oParent.removeAllPages();` && |\n| &&
` // sap.z2ui5.oParent.insertPage(sap.z2ui5.oView);` && |\n| &&
` // } else {` && |\n| &&
` this._oApp.byId("viewContainer").insertPage(sap.z2ui5.oView);` && |\n| &&
` // this._oApp.byId("viewContainer").addItem(sap.z2ui5.oView);` && |\n| &&
` // }` && |\n| &&
` },` && |\n| &&
` async readHttp() {` && |\n| &&
|\n| &&
` const response = await fetch(sap.z2ui5.pathname, {` && |\n| &&
` method: 'POST',` && |\n| &&
` headers: {` && |\n| &&
Expand Down
2 changes: 1 addition & 1 deletion src/01/04/z2ui5_cl_cc_scrolling.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CLASS z2ui5_cl_cc_scrolling IMPLEMENTATION.
` } ` && |\n| &&
` );` && |\n| &&
|\n| &&
` } , 50 , oControl );` && |\n| &&
` } , 100 , oControl );` && |\n| &&
` }` && |\n| &&
` });` && |\n| &&
`}); }`.
Expand Down

0 comments on commit a11bad5

Please sign in to comment.