使用 XML 片段创建对话框时出错 [英] Error While Creating a Dialog Box Using XML Fragments

查看:31
本文介绍了使用 XML 片段创建对话框时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在用户按下按钮后尝试显示对话框时出现以下错误,

I am getting the below error while trying to display a dialog box after user presses a button,

sap-ui-core.js:80 未捕获错误:无法从 resources/sap/m/buttons.js 加载sap/m/buttons.js":404 - 找不到资源!

sap-ui-core.js:80 Uncaught Error: failed to load 'sap/m/buttons.js' from resources/sap/m/buttons.js: 404 - Resource could not be found!

请在下面找到 XML 代码.

Please find the XML code below.

<Dialog xmlns="sap.m"
  icon="sap.icon://filter"
  title="Filter product details">
  <content>
    <List id="ls2"
      items="{/value}"
      mode="MultiSelect">
      <StandardListItem title="{CompanyName}"/>
    </List>
  </content>
  <buttons>
    <Button text="ok" icon="sap-icon://accept" press="handleok"/>
    <Button text="Cancel" icon="sap.icon://cancel"/>  
  </buttons>
</Dialog>

推荐答案

所以问题是 UI5 版本毕竟已经过时了.聚合 buttons 从 1.21.1 版开始引入.

So the issue was that the UI5 version was quite outdated after all. The aggregation buttons was introduced as of version 1.21.1.

这篇关于使用 XML 片段创建对话框时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆