Why the navigation to TwoColumnsMidExpanded does not work?

自作多情 提交于 2021-01-07 03:01:28

问题


I have created an app based on Flexible Column Layout. The landing page looks as follows:

When the button Go to master detail is clicked, then it should route to /overview page with TwoColumnsMidExpanded.

The press handler is defined as follows:

onPress: function (evt) {
            this.oRouter.navTo("overview", {
                layout: fioriLibrary.LayoutType.TwoColumnsMidExpanded
            });
        }

The source can be found on https://github.com/softshipper/fcl.


回答1:


passing the name of the layout via routing parameters just does this: passes the name of the layout via routing parameters.

you still have to take care of the layout in your applications event handlers for the event routeMatched.

Here is a nice working example:

https://sapui5.hana.ondemand.com/#/entity/sap.f.FlexibleColumnLayout/sample/sap.f.sample.FlexibleColumnLayoutWithFullscreenPage/code/webapp/controller/FlexibleColumnLayout.controller.js

pay attention to onBeforeRouteMatched handler in FlexibleColumnLayout.controller.js on how to deal with that.



来源:https://stackoverflow.com/questions/65390737/why-the-navigation-to-twocolumnsmidexpanded-does-not-work

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