【问题标题】:Dialog box shows blank UI5对话框显示空白 UI5
【发布时间】:2018-07-21 02:38:02
【问题描述】:

我已将我的对话框视图定义如下。由于某种原因,它给出了空白对话框。如果我取消注释已经注释的控件并注释整个 ,那么它可以正常工作。我不明白 .相同的代码适用于另一个带有

的对话框

View.xml

    <core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout">
    <Dialog id="editCompanyDialog" contentWidth="800px" contentHeight="100%" afterClose="onCancelEditCompanyDialog"
        busy="{sharedApp>/oBusy/busy}" busyIndicatorDelay="{sharedApp/oBusy/delay}">
        <!--<Toolbar class="modal-header">-->
        <!--    <Text text="Edit Company Information" class="modal-title"/>-->
        <!--    <core:Icon class="modal-logo" src="sap-icon://edit-icon"/>-->
        <!--    <Button text="x" class="btn-link modal-close-button" press="onCancelEditCompanyDialog"/>-->
        <!--</Toolbar>-->
    <subHeader>
            <Toolbar>
                <Text class="sapUiSmallMarginBegin dialogTitle" text="{/headerText}"/>
                <ToolbarSpacer></ToolbarSpacer>
                <Button class="btn-link-grey" custdata:name="maDialog" icon="sap-icon://decline" tooltip="{i18n>GB_Close}" press="onCloseDialog"/>
            </Toolbar>
   </subHeader>
    <Panel>
            <content>
        <l:BlockLayout id="editCompanyBlockLayout">
            <l:BlockLayoutRow>
                <l:BlockLayoutCell>
                    <VBox>
                        <ObjectIdentifier text="Edit your company information"/>
                    </VBox>
                </l:BlockLayoutCell>
            </l:BlockLayoutRow>
            <l:BlockLayoutRow>
                <l:BlockLayoutCell>
                    <VBox>
                        <Label text="{i18n>CC_Company}" labelFor="Name1"/>
                        <Input id="Name1" textAlign="Left" value="{EditCompany>/Input/Name1}" fieldGroupIds="FC"/>
                    </VBox>
                </l:BlockLayoutCell>
            </l:BlockLayoutRow>
 </content>
</Panel>

【问题讨论】:

  • 我在定义时忘记在开头添加 xmlns:custdata。问题解决了:)

标签: dialog sapui5


【解决方案1】:

在您的按钮中,您正在使用自定义数据命名空间,但尚未声明它。

添加

xmlns:custdata="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"

core:FragmentDefinition 标记中的视图顶部

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多