Sapui5 sap.m.Shell&;sap.ui.commons.ApplicationHeader<;部门>;问题
我在shell中设置应用程序,如下所示,在index.htmlSapui5 sap.m.Shell&;sap.ui.commons.ApplicationHeader<;部门>;问题,sapui5,Sapui5,我在shell中设置应用程序,如下所示,在index.html new sap.m.Shell({ app : new sap.ui.core.ComponentContainer({ height : "100%", name : "xx.xx.xx" }) }).placeAt("content"); 是否也可以将应用程序标头控件添加到此控件 //create the ApplicationHea
new sap.m.Shell({
app : new sap.ui.core.ComponentContainer({
height : "100%",
name : "xx.xx.xx"
})
}).placeAt("content");
是否也可以将应用程序标头控件添加到此控件
//create the ApplicationHeader control
var oAppHeader = new sap.ui.commons.ApplicationHeader("appHeader");
//configure the branding area
oAppHeader.setLogoSrc("http://www.sap.com/global/images/SAPLogo.gif");
oAppHeader.setLogoText("Logo Text");
//configure the welcome area
oAppHeader.setDisplayWelcome(true);
oAppHeader.setUserName(userFullName);
//configure the log off area
oAppHeader.setDisplayLogoff(true);
oAppHeader.placeAt("content");
当我在Shell之前或在main中添加它时,它看起来不错,但屏幕大小增加了100%以上,因此您必须滚动以查看页脚(或应用程序页眉,取决于它的位置)
这是Main.view.xml和Main.controller.js
<core:View xmlns:core="sap.ui.core"
xmlns="sap.m" controllerName="emc.ui.sc.view.Main"
displayBlock="true" height="100%" >
<App id="idMain">
</App>
</core:View>
sap.ui.controller("emc.ui.sc.view.Main", {
onInit : function() {
if (sap.ui.Device.support.touch === false) {
this.getView().addStyleClass("sapUiSizeCompact");
}
}
});
sap.ui.controller(“emc.ui.sc.view.Main”{
onInit:function(){
if(sap.ui.Device.support.touch==false){
this.getView().addStyleClass(“sapuizizeCompact”);
}
}
});
正如名称所示,Shell打算用作根控件。因此,ApplicationHeader必须包含在Shell中。你为什么不使用
您好,我可以在main中添加应用程序头(在shell中),这更像是屏幕大小超过100%时的滚动问题。我真的在问这些是兼容的,还是使用具有可用头属性的shell(比如unified)更好。在unified shell本身上,它声明“不要在Fiori Lauchpad内部运行的应用程序中使用此控件,也不要将其用于根控件用例以外的其他场景”,我不确定是否要以这种方式限制我的应用程序。