Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Launchpad Detail View Back Button doesnt work

Hello everyone,

we deployed an app into the fiori launchpad and the nav (back) -button of the detail view doesnt work. The logic for the nav-button is auto implemented by the web ide and looks like this

handleNavButtonPress: function() {

        console.log("nav button pressed");

        var history = sap.ui.core.routing.History.getInstance();

        var router = sap.ui.core.UIComponent.getRouterFor(this);

        var url = router.getURL("master", {});

        var direction = history.getDirection(url);

        if (direction === "Backwards") {

            /* eslint-disable */

            window.history.go(-1);

            console.log("history -1");

            /* eslint-enable */

        } else {

            console.log("backToMaster");

            router.navTo("master", {}, true); // otherwise we go backwards with a forward history

        }

    }

First time we press the button line 9 in the code is called and nothing happens. There is no switch to the master view. After that line fourteen is called an nothing happens. The router is also autogenerated by the webide an looks like this:

routing: {

    config: {

        viewType : "XML",

        viewPath: "TourApp.view",  // common prefix

        targetAggregation: "detailPages",

        clearTarget: false

    },

    routes:

        [{

            pattern: "",

            name : "master",

            view : "Master",

            targetAggregation : "masterPages",

            preservePageInSplitContainer : true,

            targetControl: "fioriContent",

            subroutes : [

                            {

                                pattern : "Detail/{contextPath}", // will be the url and from has to be provided in the data

                                view : "Detail",

                                name : "Detail" // name used for listening or navigating to this route

                            }]

        }]

}

Can anyone help?

Thanks,

Silvio.

Tags:
Former Member
Former Member replied

In our case the reason for this seemed to be outdated launchpad because of an outdated underlaying SAP System. After an update navigation works fine.

Thanks for all the kind answers.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question