-
Notifications
You must be signed in to change notification settings - Fork 166
Description
Issue description
We are developing an application using the Flexible Programming Model (FPM) with the Custom Page Template in SAP Business Application Studio.
The generated page uses the base controller sap/fe/core/PageController and XML Views containing sap.fe.macros.FilterBar and sap.fe.macros.Table.
However, we cannot find any documentation or working sample that shows how to activate Application State Handling (AppState) for such apps.
When filters are changed in the FilterBar, the URL does not update with the sap-iapp-state parameter, and the application does not restore its state on reload.
References
SAP official Flexible Programming Model sample:
https://ui5.sap.com/test-resources/sap/fe/core/fpmExplorer/index.html#/topic/customPage
Related Fiori Elements ViewState example (not applicable to Custom Page):
https://ui5.sap.com/test-resources/sap/fe/core/fpmExplorer/index.html#/controllerExtensions/viewState
API Reference: sap.fe.core.ExtensionAPI
Problem Summary
he available example (controllerExtensions/viewState) demonstrates state handling using sap/ui/core/mvc/ControllerExtension on an Object Page.
However, applications created using the Custom Page Template rely on sap/fe/core/PageController, not on a controller extension, and the same approach cannot be applied.
There is also no clear documentation on:
-
How to register sap.fe.macros.FilterBar and sap.fe.macros.Table for application state management.
-
Whether the framework automatically handles state persistence for these controls when using the Flexible Programming Model.
-
Whether developers need to manually call updateAppState() via ExtensionAPI, and if so, how to register relevant controls so they participate in the AppState lifecycle.
Expected Behavior
When filters in the FilterBar are changed, the application should update the URL with a sap-iapp-state parameter.
On reload or navigation back, the filters and table state should be restored automatically.
The documentation should include an example or manifest configuration for enabling app state handling in the Flexible Programming Model (Custom Page).
Actual Behavior
Changing filters does not add sap-iapp-state to the URL.
The app state is lost when navigating back or reloading.
ExtensionAPI.updateAppState() is available but lacks guidance on how to register participating controls.
Steps to Reproduce
-
Create a new app in BAS using the Custom Page Template (Flexible Programming Model).
-
Add a FilterBar and Table via macros (sap.fe.macros.FilterBar and sap.fe.macros.Table).
-
Run the app and change filters — observe that no sap-iapp-state is appended to the URL.
-
Reload the app — the filter state is not restored.
Request
Please clarify or provide:
-
Documentation or example for enabling Application State Handling in Custom Page (Flexible Programming Model) apps.
-
Guidance on how to connect the FilterBar and Table to the AppState lifecycle via ExtensionAPI or manifest configuration.
-
Confirmation whether this is a current limitation of the Flexible Programming Model.
Feedback Type (Optional)
None
Page Title on SAP Help Portal (prefilled)
No response
Page URL on SAP Help Portal (prefilled)
No response