softshipper
softshipper

Reputation: 34071

Why the navigation to TwoColumnsMidExpanded does not work?

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

enter image description here

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.

Upvotes: 0

Views: 767

Answers (1)

iPirat
iPirat

Reputation: 2206

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.

Upvotes: 1

Related Questions