【问题标题】:how to add label inside expanded panel sapui5如何在扩展面板 sapui5 内添加标签
【发布时间】:2016-10-19 14:25:40
【问题描述】:

您好,我有一个对话框,其中包含一个面板,我应该展开它并显示一个文本/标签或另一个带有一些文本的控制器。 我设法做面板的东西,但我不知道如何在展开的面板内显示标签。(我找不到任何用 js 制作的例子,而没有在 xml 中做)

这是我的代码:

var panel = new sap.m.Panel("panel-1", {
            /*      justifyContent : sap.m.FlexJustifyContent.Center,*/
                    headerText:(oError.message),
                    width : '100%',
                    expandable: true
                });
var dialog = new Dialog({
                title: "There was an error while trying to resend the message",
                contentWidth: "500px",
                resizable: true,
                type: 'Message',
                state: 'Error',
                /*content: new sap.m.Label({
                    id : 'labeldialog',
                    justifyContent : sap.m.FlexJustifyContent.Center,
                    text: JSON.parse(oError.response.body).error.message.value,
                }),*/
                content: [panel],

            beginButton: new sap.m.Button({
                text: 'Close',
                press: function () {
                    dialog.close();
                }
            }),

            afterClose: function() {
                dialog.destroy();
            }
        });

        dialog.open();

我应该使用什么来实现控件,以便将字符串或参数放在折叠部分中。谢谢。

【问题讨论】:

    标签: javascript dialog panel sapui5


    【解决方案1】:

    你试过了吗?

    var panel = new sap.m.Panel("panel-1", {
                    headerText:(oError.message),
                    width : '100%',
                    expandable: true,
                    content: [ new sap.m.Text("someId", { "Your message here" })]
                });
    

    【讨论】:

      猜你喜欢
      • 2019-10-09
      • 2015-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-18
      • 2020-05-25
      相关资源
      最近更新 更多