1

我使用 ODATA 服务在 SAPUI5 中创建了一个表。直到今天它工作得非常好。今天 HTML 文件加载了一个空白页面,当我检查开发人员工具时,我看到以下错误:

Failed to load resource http://hana_server_name:4000/ui_test/ui5_test/WebContent/ui5_test/VisitorData.view.js
Uncaught Error: failed to load 'ui5_test/VisitorData.view.js' from ./ui5_test/VisitorData.view.js: 0 - NetworkError: A network error occurred.

ODATA 服务工作正常,我使用相同的 ODATA 文件创建图表,并且图表呈现正常。对于我创建的 2 个表,我收到了相同的错误消息。看起来这是由服务器的一些更改引起的,但我不确定发生了什么变化,或者我的代码是否有问题。如果它是服务器错误,我应该寻找什么。

谢谢你,萨尔曼

4

2 回答 2

1

The error message is pretty obvious, isn't it? Your view VisitorData.view.js was simply not found and therefore can not load. Did you check if it is physically available on the server? Missing file permissions could be another reason.

You can also check http://hanaservername.com:4000/ui_test/ui5_test/WebContent/resources/ to see a listing of the deployed sources (if your application/server is configured to allow that). On Java Application Servers (local Tomcat, Java Stack, no clue what HANA uses...) you need to set the following in your web.xml:

  <context-param>
    <param-name>com.sap.ui5.resource.DEV_MODE</param-name>
    <param-value>true</param-value>
  </context-param>
于 2014-01-24T11:30:29.900 回答
0

我认为您正在将从服务器获取的数据绑定到您的表格或图表。即使服务器没有为您提供数据,您的代码也应该可以正常工作而不会出现任何错误,所以我认为问题应该出在您的代码中。只需在浏览器上打开调试模式运行代码,然后单击浏览器抛出的错误,它将引导您到导致错误的行

于 2014-01-06T09:44:01.347 回答