on 07-14-2016 9:52 AM
Hai Laura Jungwirth,
I had written a code for that, you may need a simple change in your code.
Change your if() condition as followed.
var oHistory = sap.ui.core.routing.History.getInstance().getPreviousHash(),
oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
if (sPreviousHash !== undefined || !oCrossAppNavigator.isInitialNavigation()) {
history.go(-1);
} else {
oCrossAppNavigator.toExternal({
target: {shellHash: "#Shell-home"}
);
}
Try it once.
Still If you are not getting please inform me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have created Master-Detail app from Web IDE and deployed it to the Cloud, then integrated it with the cloud launchpad. Then when I access the app from the cloud launchpad and click on the back button in the header of the master view it navigates back to the launchpad homepage.
Even when I run the master-detail app as a web app from Web IDE the back button works fine.
In the Master.controller.js file the onNavBack function has the below code (generated by the framework), verify if the same code is present in your case:
var oHistory = sap.ui.core.routing.History.getInstance(),
sPreviousHash = oHistory.getPreviousHash(),
oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
if (sPreviousHash !== undefined) {
// The history contains a previous entry
history.go(-1);
} else {
// Navigate back to FLP home
oCrossAppNavigator.toExternal({
target : {shellHash: "#Shell-home"}
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.