on 11-17-2015 8:35 PM
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?
Hi Suhaas,
How about using hideMaster on your splitapp, more info - SAPUI5 SDK - Demo Kit
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try using
splitapp.setMode(sap.m.SplitAppMode.HideMode)
Regards,
Jamie
SAP - Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.