控制器没有加载自定义磁贴

问题描述 投票:0回答:1

我用sap ui5使用通用tile制作了一个自定义磁贴。现在我在fiori launchpad中使用它作为我的自定义磁贴。所以,当应用程序加载时,它会加载磁贴的xml视图,但会为磁贴的控制器提供404错误。

    The view instantiation resulted in js errorError: failed to load 
    'tile2/viewTile/controller/View1.controller.js' from https://sapui5.hana.ondemand.com/1.64.0/resources/tile2/viewTile/controller/View1.controller.js: 404

虽然xml视图正在加载,但命名空间和其他所有内容都会自动配置

Name:
viewtile.view.View1
Prefix:
viewtile
Path:
/sap/fiori/viewtile/

得到这个

enter image description here

实际结果应该是

enter image description here

sapui5 sap-fiori
1个回答
0
投票

请检查您的配置和路径。错误消息说:“...无法加载......来自https://sapui5.hana.ondemand.com/1.64.0/resources/tile2/viewTile/controller/View1.controller.js:404”

你不会在https://sapui5.hana.ondemand.com/1.64.0上找到自己开发的View1.controller.js。这里讨论了类似的问题:https://answers.sap.com/questions/98633/fiori-launchpad-custom-tile-controllerjs-path-issu.html答案是在部署到Fiori Launchpad时从视图和控制器文件中删除应用程序名称。

© www.soinside.com 2019 - 2024. All rights reserved.