Custom App State in Fiori Elements V2
FE V2 allows applications to extend app state with custom data. It provides some hook functions; applications need to implement these hook functions to manage the lifecycle of custom state data. Scenario: In an ALP, users can navigate to a object page from list report table by selecting multiple records. On the object page, one table only displays selected records by providing filters to its row binding . But if users refresh the object page, since the added filters are gone, all documents will be displayed in this table. The expected behavior is, when refresh the object page, the table displays the same data as before refreshing. Solution: The idea is saving selected record keys(from ALP) as the object page's app state. Once the object table's binding filter is updated, call function onCustomStateChange of extension API. The ideal place of calling this for this case is event handler of before table rebinding. This is to inform framework that custom state is changed and need to...