-2

Sometime we lose the SplittApp master button from the view, if we change the SplitAppMode.

Is there a way to check if the button is visible or not? And if we can check for it, a way to enable this button again?

enter image description here

if (app.getMode() === "ShowHideMode") {
    app.setMode(sap.m.SplitAppMode.HideMode);
} else {
// to get it really to work, we have to set the ShowHideMode at first
   app.setMode(sap.m.SplitAppMode.ShowHideMode);
   app.setMode(sap.m.SplitAppMode.HideMode);
}
matbtt
  • 4,163
  • 17
  • 25
user2405095
  • 103
  • 3
  • 12
  • What does "sometimes we lose the button" mean exactly? – matbtt Mar 07 '17 at 17:31
  • It means, at this point there is nothing. Also the NavBack Btn is away. – user2405095 Mar 07 '17 at 18:25
  • Okay, maybe I should ask in a different way: What does "sometimes we lose the button [...], if we change the SplitMode" mean? Please describe exactly what you set when. – matbtt Mar 07 '17 at 18:39
  • sorry, if I was not precisely enough. We set the SplitMode "HideMode" as soon as someone is clicking a button for the first time on the DetailView. If we navigate to an other view and navigate back more times, the MasterBtn-Icon disappears. – user2405095 Mar 07 '17 at 19:55
  • pls. let me know, if I missed something – user2405095 Mar 07 '17 at 20:00
  • I also observed that behaviour normally there is a burger menu button on top of the detail view if the screen of a master detail app is to small to show both views. I assume this is implemented in SAPUI5 itself. But (sometimes) the button is not shown up. I observed that issue with SAPUI5 1.28.x quite often in newer versions it seems fixed, so maybe that is your issue and an update would help? – user3783327 Mar 08 '17 at 14:24
  • We are working with the latest release. I don't think it has something to do with it. I know we are forcing this behavior by us our self while we close the master view by setting the "HideMode". We are attaching this event on each initial entry point on the detail view to close the MasterView. – user2405095 Mar 08 '17 at 19:49

1 Answers1

-2

I suggest using the CSS applied to the button via jQuery to see whether the button itself is hidden or not.

Eg. $("#ID of the button from your code").attr("class").indexOf("sapMSplitContainerMasterBtnHidden")

where: ID of the button from your code: is the identified that was generated for the hamburger button. You can get this from the elements pane of Chrome web developer tools or any other browser. sapMSplitContainerMasterBtnHidden: is the name of the CSS class applied whenever the button is hidden (meaning the master view is displayed)

Hope this helps you.

Sid
  • 134
  • 6