UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

35 lines (27 loc) 985 B
// eslint-disable-next-line no-undef sap.ui.define([ "sap/ui/demo/nav/controller/BaseController" ], function (BaseController) { "use strict"; return BaseController.extend("sap.ui.demo.nav.controller.NotFound", { onInit: function () { var oRouter, oTarget; oRouter = this.getRouter(); oTarget = oRouter.getTarget("notFound"); oTarget.attachDisplay(function (oEvent) { this._oData = oEvent.getParameter("data"); // store the data }, this); }, // override the parent's onNavBack (inherited from BaseController) onNavBack : function () { // in some cases we could display a certain target when the back button is pressed if (this._oData && this._oData.fromTarget) { this.getRouter().getTargets().display(this._oData.fromTarget); delete this._oData.fromTarget; return; } // call the parent's onNavBack BaseController.prototype.onNavBack.apply(this, arguments); } }); });