2025 Apr 08 12:18 PM - edited 2025 Apr 08 12:21 PM
Hi everyone,
I'm developing a Fiori Elements app using UI5 version 1.120.x. The app includes a ListReport and an ObjectPage. I've now added a third view using a custom page based on the Flexible Programming Model. The new view is called Employee, and its controller extends from sap/fe/core/PageController.
I’m trying to figure out two things:
How can I detect when the navigation to this custom page has occurred?
How can I read optional routing parameters that might have been passed during navigation?
I noticed that when using a Controller Extension, it's possible to override certain lifecycle methods like onBeforeBinding or onAfterBinding, as shown here:
https://sapui5.hana.ondemand.com/test-resources/sap/fe/core/fpmExplorer/index.html#/controllerExtens...
However, this approach doesn’t seem to work for view controllers that inherit directly from sap/fe/core/PageController. Is there an equivalent or recommended way to hook into the navigation lifecycle for such custom pages?
Any guidance or examples would be greatly appreciated!
Thanks a lot!
Request clarification before answering.
I made the mistake of reading the component using getOwnerComponent(). However, if you read the component within a controller using this.getAppComponent(), you can then access this.getAppComponent().getRouter() and intercept the necessary events there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.