cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements - Custom View Refresh

mvoros
Active Contributor
0 Kudos

Hi,

I have a Fiori Elements app for Object with List/Object page. The oData version is 4. I implemented a custom view as is described here.

https://sapui5.hana.ondemand.com/test-resources/sap/fe/core/fpmExplorer/index.html#/customElements/c...

In the custom section, I have a custom calendar control that displays the same objects as are shown in the table. The problem I am seeing is with refresh. Neither Save Draft nor Discard Draft triggers refresh of my custom view. Hence the calendar keeps showing obsolete data. Is there a suitable extension point that I could use to force refresh of my custom control? The global side effects described for draft do not seem to work in this case. I can't find any suitable extension point in the documentation for oData v4.


Thanks

View Entire Topic
Epena
Participant
0 Kudos

Hello, maybe you could implement an event handler on extension API for Object pages, specifically AfterActivate and AfterCancel, and call an OData refresh method so your component is up-to date with changes.

https://sapui5.hana.ondemand.com/#/api/sap.suite.ui.generic.template.ObjectPage.extensionAPI.DraftTr...

Regards.

mvoros
Active Contributor

Hi,

thanks for your comment but the extension point is only available for oData v2. I have service with version oData v4. On the side note, it's really annoying that we have two versions of the same concept and each version works slightly differently.


Anyway, today I found a similar workaround. I use override for method routing.onAfterBinding. So when binding changes, I remember if binding is for draft or not. When binding changes next time and it was a draft previously, I refresh my bindings. It seems to be working fine.