SAPUI5 routing throws error “Control (ID of an App control) does not has an aggregation called pages”

主宰稳场 提交于 2019-12-02 03:09:19

I've found out what's wrong. It's kinda a "scope" problem. You can't join the same control as your parent route has. You can produce the following error message with the same problem:

Control with ID idAppControl could not be found

What I've done is:

         routes: [
            {
                pattern: "",
                name: "menu",
                view: "Menu",
                targetAggregation: "pages",
                targetControl: "idAppControl"
            },
            {
                pattern: "Reports",
                name: "reports",
                view: "SplitContainer",
                targetAggregation: "pages",
                targetControl: "idAppControl",
                clearTarget: true
            }
        ]

In retrospect this seems to be quite logical :D

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!