主菜单在移动设备上不可见,但在InternetExplorer上可见 [英] Master menu is not visible on mobile devices but is visible on InternetExplorer

查看:124
本文介绍了主菜单在移动设备上不可见,但在InternetExplorer上可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SAPUI5应用程序使用sap.m.splitapp在MasterDetailView中显示一些数据.我的问题已退出,等于问题

I'm working on a SAPUI5 App showing some data in a MasterDetailView using the sap.m.splitapp. My Problem is quit equal to the question Master menu is not visible on mobile devices but is visible on tablet.

在我的情况下,我遇到的情况是,我将根据请求的数据创建一个具有MasterController的MasterPage.根据这些数据,我可以在MasterController的函数中动态创建DetailPages.

In my case, I have the situation, that I'm going to create a MasterPage with a MasterController depending on requested data. Depending on these data I create dynamically the DetailPages in a function of the MasterController.

for(var i=0;i<adata.inhaltList.length;i++){var DetailPage = new sap.m.Page({
            title: masterString,
            showNavButton: true,
            navButtonPress:function () {
               var oSplitApp = this.getView().getParent().getParent();
               var oMaster = oSplitApp.getMasterPages()[0];
               oSplitApp.toMaster(oMaster, "flip");
            }
        });        };

在我的测试设备上,除了无法显示母版页甚至没有按钮的事实之外,其他所有东西都工作正常.

On my test device, everything is working fine except the fact, that I have no possibility to show the MasterPage, even no Button is shown.

我已尝试解决链接问题的解决方案,但出现错误:对象元素sap.m.Page #__ page0没有方法'getView'".所以它没有用. 甚至是一个自己动手的解决方案,在自定义标头中添加一个按钮:

I have tried the solution of th linked question, but I get the error: "Object Element sap.m.Page#__page0 has no method 'getView'". So it didn't work. Even a Do-it-yourselve solution, adding a button in a custom-Header:

contentLeft: [new sap.m.Button({
    icon: "sap-icon://paging",
    press: function() {
        var splitApp = sap.ui.getCore().byId("ContentApp");
        if (splitApp.isMasterShown()) {
            console.log("Master weg");
            splitApp.hideMaster();
        } else {
            console.log("Master kommt");
            splitApp.showMaster();
            var oSplitApp = this.getView().getParent().getParent();
            var oMaster = oSplitApp.getMasterPages()[0];
            oSplitApp.toMaster(oMaster, "flip");
        };
    }
})]

,并尝试手动显示主人"无效.

and trying to show the Master manually didn't work.

SAPUI5函数:oSplitApp.showMaster();在资源管理器中可以正常工作,但不能在设备上正常工作!有人知道为什么吗?可能有解决方案吗?

The SAPUI5 function: oSplitApp.showMaster(); works fine in the explorer but not on the device! Does anybody knows why? And has probably a solution?

推荐答案

我发现了:

即使带有邮政技巧",SplittApp类也不适用于电话"类别.因此,要查看masterView,我创建了一个PopupMenu,看起来像MasterPage.

Even with the postet "tricks", the SplittApp class is not available for the Phone category. So, to see the masterView, I have created a PopUpMenu, which looks like the MasterPage.

一切都很好,感谢您降级了我的问题,因为没人知道.

Everything fine know and thank you for downgrading my question, because nobody knows that exactly.

这篇关于主菜单在移动设备上不可见,但在InternetExplorer上可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆