我的申请程序运行良好。现在,我已经将我的SAPUI5库更改为CDN1.48.9版本。
我得到以下错误:
Uncaught :无法设置TileContainer-dbg.js:1207中未定义的属性'className‘。
这是我的代码:
<core:View xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
controllerName="sbmobiledashboard.overview"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page id="overview.page" title="{i18n>pageEventsOverview}" navButtonPress="handleNavButtonPress" enableScrolling="false">
<content>
<TileContainer id="container" tileDelete="handleTileDelete"
tiles="{modelTiles>/tiles}">
<StandardTile
icon="{modelTiles>icon}"
type="{modelTiles>type}"
number="{modelTiles>number}"
numberUnit="{modelTiles>numberUnit}"
title="{modelTiles>title}"
info="{modelTiles>info}"
infoState="{modelTiles>infoState}"
press="handleTilePress" />
</TileContainer>
</content>
</Page>
我的结果集如下:
{
d: {
results: [
{
__metadata: {
id: "http://<host>:8003/sap/opu/odata/<namespace>/<service>
/homeTilesSet(guid'000C29CE-10EA-1ED7-ABA0-EB1B4D8838E0')",
uri: "http://<host>:8003/sap/opu/odata/<namespace>/<service>
/homeTilesSet(guid'000C29CE-10EA-1ED7-ABA0-EB1B4D8838E0')",
type: "/<namespace>/<service>.homeTiles"
},
guid: "000C29CE-10EA-1ED7-ABA0-EB1B4D8838E0",
title: "Critical Events (24h)",
icon: "sap-icon://alert",
number: "66 ",
numberUnit: "Events",
info: "Severity critical",
infoState: "Error",
type: "Create"
},
{
__metadata: {
id: "http://<host>:8003/sap/opu/odata/<namespace>/<service>
/homeTilesSet(guid'000C29CE-10EA-1ED7-ABA0-EB1B4D8858E0')",
uri: "http://<host>:8003/sap/opu/odata/<namespace>/<service>
/homeTilesSet(guid'000C29CE-10EA-1ED7-ABA0-EB1B4D8858E0')",
type: "/<namespace>/<service>.homeTiles"
},
guid: "000C29CE-10EA-1ED7-ABA0-EB1B4D8858E0",
title: "Event collection (24h)",
icon: "sap-icon://share-2",
number: "123 ",
numberUnit: "Events",
info: "",
infoState: "None",
type: "None"
},...调试器告诉我,这个问题发生在上面列出的SAPUI5库函数中。如果我操作的结果集只包含第一个瓷砖,则应用程序可以工作。在以前的1.30.10版本中,代码和相同的结果集工作得很好。我想知道是什么让它在最新的图书馆里出错了。
发布于 2017-10-10 23:29:53
我也遇到了1.48.9版本的一些问题。如果您的代码在不同版本中运行良好,请尝试将SAPUI5库的版本更改为1.48.10。您可以在引导部分的index.html中更改它。如果这不能解决问题,请张贴完整的错误日志。
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.48.10/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"com.xyz": ""}'>
</script>发布于 2018-03-27 09:05:25
正如今天所发现的,sap.m.TileContainer是不受欢迎的。见文档:https://sapui5.netweaver.ondemand.com/#/api/sap.m.TileContainer
https://stackoverflow.com/questions/46650392
复制相似问题