Skip to Content
author's profile photo Former Member
Former Member

splitapp - issues

splitapp - how to hide master when I click on the event in master, I am rendering information in the detail page.

I am using all the different modes like popup, hide mode or showhide mode, but the master is not hiding after rendering details in the detail page.

should we do it explicitly?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Nov 17, 2015 at 09:42 PM

    Hi Suhaas,

    How about using hideMaster on your splitapp, more info - SAPUI5 SDK - Demo Kit

    Hope this helps

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Tingikar,

      I am using the below code as per your suggestion, its working perfectly in Win7 Desktop -> Chrome Browser for normal URL.

      splitapp.setMode(sap.m.SplitAppMode.HideMode)
      splitapp.hideMaster();
      


      but, this is not working for fakeOS mode in the URL, when I am testing in Mobile as well as in Win 7 -> Chrome with fakeOS = android.


      sap-ui-xx-fakeOS=android.

  • Posted on Nov 18, 2015 at 11:20 AM

    Hi Suhaas, This piece of code toggles between hiding and showing the view.

    (in your event or wherever you want to hide the master)

    app = sap.ui.getCore().byId("id_app");

    if(app.getMode() == "ShowHideMode"){

    app.setMode(sap.m.SplitAppMode.HideMode);

    }

    else{

    app.setMode(sap.m.SplitAppMode.ShowHideMode);

    }

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2015 at 08:43 PM

    Try using

    splitapp.setMode(sap.m.SplitAppMode.HideMode)

    Regards,

    Jamie

    SAP - Technology RIG

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 18, 2015 at 04:26 PM

    Can you try this?

    var myApp = new sap.m.SplitApp({
    mode: sap.m.SplitAppMode.ShowHideMode,
    beforeMasterOpen: function() {
    this.setMode(sap.m.SplitAppMode.ShowHideMode);
    },
    });

    masterClicked: function(oControlEvent) {
    myApp.toDetail("your.View");
    myApp.setMode(sap.m.SplitAppMode.HideMode);
    }


    or

    this.app = new sap.m.SplitApp("myAppID",{

    afterDetailNavigate: function() {

    if (sap.ui.Device.system.phone) {

    this.hideMaster();

    }

    },

    });

    You can simulate android app by passing the fakeOs parameter in the url,

    http://<path>/index.html/?sap-ui-xx-fakeOs=android .


    Best regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2016 at 05:09 AM

    hi ,

    Master list will be automatically hidden in mobiles so no need of writing any extra logic , but not in desktop and tablets. So first write code to detect devices (desktop , tablet or mobiles) then write logic which will hide and show masterlist .

    go through this discussion

    SAPUI5: What is the best Reliable way to detect... | SCN

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.