我的應用程序運行良好。現在我已將SAPUI5庫更改爲CDN 1.48.9版。TileContainer無法設置未定義SAPUI5的屬性'className'版本1.48
我收到以下錯誤:
Uncaught TypeError: Cannot set property 'className' of undefined in TileContainer-dbg.js:1207.
這裏是我的代碼:
<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"
},...
調試器告訴我問題發生在我身上n以上列出的SAPUI5庫函數。在我操作結果集的情況下,只包含第一個圖塊,該應用程序可以工作。 在以前的版本1.30.10中,代碼和相同的結果集正常工作。我想知道是什麼讓它在最新的庫中引發錯誤。
該問題似乎僅限於Chrome。在Firefox中,它適用於我。也許是一個標準的錯誤(?) –