dialog - 对话框显示空白 UI5
问题描述
我已将我的对话框视图定义如下。由于某种原因,它给出了空白对话框。如果我取消注释已注释的控件并注释整个 ,那么它可以正常工作。我不明白 . 相同的代码适用于另一个对话框
视图.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="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
到core:FragmentDefinition
标签中视图的顶部
推荐阅读
- c++ - 为什么 lldb 漂亮的打印机不适用于 MacOS 上的 GNU GCC 编译程序?
- node.js - 了解 Flutter、NodeJS 和 Cloud Functions 中的 JSON 转换。面临代码中的主要问题
- react-native - useState 不是 useEffect 中的函数
- angular - 如何在 Angular slickgrid 中使用格式化程序创建自定义工具提示而不创建角度组件?
- c++ - 窗口上的 Tesseract api 链接器(或构建?)问题
- aws-amplify - 放大开发者菜单 - 如何禁用它
- aws-api-gateway - 是否可以在 AWS API Gateway 中记录请求正文大小?
- javascript - Vue v-for not update model variable
- algorithm - 为什么我的递归归并排序算法会导致堆栈溢出?
- git - 变基后 git checkout 到原点