cancel
Showing results for 
Search instead for 
Did you mean: 

Disable NavBack on Fiori Apps in Portal

andreas_gall2
Participant
0 Kudos

Hi,

we are currently working on a project to replace some HR ESS WD applications with it Fiori couterpart like My Paystubs. With the Fiori iView template it is quite easy to do that. But when opening a Fiori app directly (with all the Shell-runStandaloneApp parameters) there is still the back "navigation back" button visible. Is there a chance to disable/hide this button without creating a custom theme? When user click it they end up nowhere.

The following Parameters are set:

Parameters Forwarded to the SAP Fiori Application

sap-ushell-config=headerless

Parameters to Pass on the Location String in the URL

Shell-runStandaloneApp?sap-ushell-SAPUI5.Component=hcm.mypaystubs&sap-ushell-url=/sap/bc/ui5_ui5/sap/hcm_pay_mon

Thank you

Andy

Accepted Solutions (0)

Answers (3)

Answers (3)

anasabdulla
Participant
0 Kudos

HI Andreas,

You got any solution?

We have the same requirement.

Thanks,

Anas Abdulla

Former Member
0 Kudos

You can modify the standard FioriLaunchpad to search for the button and hide it... it has no id, so you have to find all the buttons with document.getElementsByTagName('button') and, after that, find the one with the title 'Back'.

Use a setInterval or an observer because the object could not exist at the beginning of the load.

An check the navigation history,  window.history.length <= 1 , avoid to hide the button always, if you navigate inside the application you will want the 'back button' later

Problem... you have to modify a standard object, of course ... and I do not know the impact about the performance due to the setInterval in a productive system.

andreas_gall2
Participant
0 Kudos

Hi Anas,

the solution actually was to raise a message at SAP Support 😉 Normally in up-to-date Fiori applications there should be an exit hook to disable the navigation button. So for our scenario the applications didn't have this exit hook implemented but SAP was able to deliver an update with a note.

BUT: for one application I figured out that this exit hook is even available even when it is not explicitly implemented in the app. So what we did was to implement the function getHeaderFooterOptions() in the custom view. Our need was to disable the NavBack button only when the application runs in standalone-mode for e.g.:


getHeaderFooterOptions: function() {

     var objHdrFtr = {

          sI18NMasterTitle: "NAME_OF_TITLE",

          onBack: true

     };

     var m = new sap.ui.core.routing.HashChanger();

     var sUrl = m.getHash();

     if (sUrl.indexOf("Shell-runStandaloneApp") >= 0){

          objHdrFtr.onBack = false;

     }

     return objHdrFtr;

}

andreas_gall2
Participant
0 Kudos

No one?

agentry_src
Active Contributor
0 Kudos

Discussion successfully moved from SAP for Mobile to SAP Fiori for the obvious reason.

Regards, Mike (Moderator)

SAP Technology RIG

andreas_gall2
Participant
0 Kudos

Sorry for the inconvenience and thanks for putting it to the correct board.

agentry_src
Active Contributor
0 Kudos

no worries.  part of my regular day's work