【发布时间】:2014-08-02 20:12:15
【问题描述】:
如何在 SAP Ui5 视图的标题右侧添加一个按钮。视图是 XML 格式的。另一个视图是 JavaScript。
代码是:
return new sap.m.Page({
enableScrolling: false,
showHeader: true,
headerContent: [
],
headerContent : new sap.m.Button({
icon: "sap-icon://sys-help-2",
press : function() {
app.to("idVersion", {id:"initial"});
}
}),
title: "Application Test",
content: [oTileContainer]
});
XML 视图是:
<Page
showHeader="true"
id="idPage"
title="Personal Information"
showNavButton="true"
navButtonTap="actBack"
class="sapUiFioriObjectPage" >
<!-- this CSS class add a standard spacing to all the page content -->
<headerContent>
.......
</headerContent>
如何在 <headerContent> 标记内添加按钮以在 Javascript 中显示。
我不能使用 CustomHeader,因为其他页面会获取此内容,并且可能会影响它们。请建议。
【问题讨论】:
-
我解决了。还是谢谢你
标签: javascript xml button sapui5