我正在尝试从我的SAP UI-5应用程序导航到其他页面。(HTML的< a href /> )
我使用工具栏上的sap.m.Link导航到其他页面,它工作得很好;
new sap.m.Link(this.createId("Foo"),{
text: "Foo",
type: "Transparent",
href: myLink
}).addStyleClass("headerLink"),但是,在有文本的customTile中,我使用的是customTile。我也想对我的VBox实现同样的功能。我该怎么做呢?
请注意,我不能使用window.location.replace("http://mywebsite.com/nextPage.html");,因为它不允许我返回到我访问的最后一页。
我的customTile看起来像这样
var iconBox1 = new sap.m.VBox({
items: [
new sap.m.HBox({
items: [
new sap.m.Text({
text: "Foo" // I want to navigate after clicking on this Text or this Box generelly
}).addStyleClass("tileTextDashboard")
]
}).addStyleClass("textNumberConatainer")
]
});
var customTile1 = new sap.m.CustomTile(this.createId("tile1"), {
content: [
iconBox1
],
press: [oController.someFunction, oController]
}).addStyleClass("customTileDashboard");发布于 2017-10-19 12:39:35
编辑:问题解决了!
如果有人有同样的问题,我将添加我的解决方案:
var myLink= "https://foo.com";
var myLinkO= new sap.m.Link({
text: "text foo",
type: "Transparent",
href: myLink
}).addStyleClass("classFoo");现在只需在myLinkO中替换items数组中的VBox
https://stackoverflow.com/questions/46825287
复制相似问题