【问题标题】:Right Button in Header (XML View) in Ui5Ui5中标题(XML视图)中的右键按钮
【发布时间】: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>

如何在 &lt;headerContent&gt; 标记内添加按钮以在 Javascript 中显示。

我不能使用 CustomHeader,因为其他页面会获取此内容,并且可能会影响它们。请建议。

【问题讨论】:

  • 我解决了。还是谢谢你

标签: javascript xml button sapui5


【解决方案1】:

太棒了...我认为没有:D

但这是我的解决方案:

  <Page
    title="....."
    showNavButton="true"
    navButtonTap="actBack"
    class="sapUiFioriObjectPage" >
    <!-- this CSS class add a standard spacing to all the page content -->
    <headerContent>
    </headerContent>
    <headerContent>
            <Button
                icon="sap-icon://sys-help-2"
                press="handleNavToInfo" />
  </headerContent>
    <content>
    .......

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-15
    • 1970-01-01
    • 2015-03-03
    • 2015-09-23
    • 1970-01-01
    • 1970-01-01
    • 2019-02-22
    相关资源
    最近更新 更多