找不到ID为rootControl的SAPUI5控件-EventProvider sap.m.routing.Target

问题描述 投票:0回答:1
登录到SAPUI5页面后,

随机SAPUI5引发错误ID为rootControl的控件-EventProvider sap.m.routing.Target。我试图强制错误登录和注销。经过多次尝试(40次有时102次...)后出现错误。

我的rootControl是App.viewid =“ rootControl”,其中包含应用程序的顶部和底部。

manifest.json

{
	"_version": "1.1.0",
	"sap.app": {
		"_version": "1.1.0",
		"id": "HomePage",
		"type": "application",
		"i18n": "i18n/i18n.properties",
		"title": "{{appTitle}}",
		"description": "{{appDescription}}",
		"applicationVersion": {
			"version": "1.0.6"
		},
		"ach": "CA-UI5-FST"
	},
	"sap.ui": {
		"technology": "UI5",
		"deviceTypes": {
			"desktop": true,
			"tablet": true,
			"phone": true
		}
	},
	"sap.ui5": {
		"rootView": {
			"viewName": "HomePage.view.App",
			"type": "XML",
			"async": true,
			"id": "rootControl"
		},
		"dependencies": {
			"minUI5Version": "1.30",
			"libs": {
				"sap.m": {},
				"sap.ui.core": {}
			}
		},
		"resources": {
			"css": [
				{
				  "uri": "css/customStyle.css"
				}
			]
		},
		"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleName": "HomePage.i18n.i18n"
				}
			},
			"view": {
				"type": "sap.ui.model.json.JSONModel",
				"settings": {
					"defaultOperationMode": "Server",
					"defaultBindingMode": "TwoWay",
					"defaultCountMode": "None",
					"useBatch": false
				}
			}
		},
		"routing": {
			"config": {
				"routerClass": "sap.m.routing.Router",
				"viewType": "XML",
				"viewPath": "HomePage.view",
				"controlId": "rootControl",
				"controlAggregation": "pages",
				"transition": "slide",
				"bypassed": {
					"target": "notFound"
				},
				"async": true
			},
			"routes": [{
				"pattern": ":Layout:",
				"name": "apphome",
				"target": "home"
			}, {
				"name": "id",
				"pattern": "Id/{Id}/:Layout:",
				"target": "id"
			}, {
				"name": "details",
				"pattern": "Details/{Details}/:Replace:",
				"target": "details"
			}],
			"targets": {
				"home": {
					"viewId": "home",
					"viewName": "Homepage",
					"viewLevel": 1
				},
				"notFound": {
					"viewId": "notFound",
					"viewName": "NotFound",
					"transition": "show"
				},
				"id": {
					"viewId": "id",
					"viewName": "Id",
					"viewLevel": 2
				},
				"details": {
					"viewId": "details",
					"viewName": "Details",
					"viewLevel": 3
				}
			}
		}
	}
}

有什么想法吗?感谢您的提前帮助!

sapui5
1个回答
0
投票

随机SAPUI5引发错误...

我记得在以前的UI5版本中由于竞赛条件而遇到相同的问题:

  1. 启动应用程序时,由于Component.jssap.ui5/rootView/async: true异步检索根视图。
  2. init中的Component.js通常会初始化路由器,该路由器将检索与哈希值相对应的目标视图。while根视图仍在加载。
  3. 有时,根视图无法在目标视图之前完全加载,这会导致错误→目标不知道将视图放置在何处。

commit:d054bc1确保目标等待直到完全加载根视图。该修补程序的发布日期为1.54,但根据更改日志,该修补程序的版本也应为1.52.5+。为了查看应用运行的UI5版本,请按Ctrl + 左Alt + Shift + P。请将UI5库升级到最新的稳定版本。

我愿意不是建议同步加载根视图。

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