In our mobile app in version 10 we have a multiple local storage entities that are updated by the user.
On same screen we have two lists that displays data from this local entities.
Data is synced with the server (we can see that when looking into server tables data) and the first list is updates automatically after data synced but second list doesn't react to data on local storage change.
So that is the question - what is the default behavior and how to bind data from localstprage with screen elements as there is no analog for "Ajax refresh"?
PS: Maybe it is related to the fact that first entity records are actually updated but in the second entity records are added or removed.
Thank you for any hint.
It's a bit hard to understand what's going on without looking at your oml, but I'll give it a shot:
From what I could understand, data is being synced in the background. Once that completes, only one of your lists is being refreshed, right? So you probably already have the structure in place to react to sync events. In your case, it's probably the Layout block's "OnSyncComplete" event that is being handled by your screen. That handler would be a client action that allows you to implement logic to be executed when sync is completed. So you could use a "Refresh Data" element in that action to refresh the Aggregate your second list is bound to.
Yes, I've used "refresh data" and all is working now. Only question is that why I didn't have to add refresh in first list case where data is updated (one of fields is changed).
Is it possible that the data of the first entity finishes synchronizing before the first Local Storage Aggregate is triggered? Or the screen is already open and fully rendered when the sync starts?
The screen is already loaded. I have a list with ifs that displays or not element depending of local storage element field value. and when this filed is changed the elements in list are re rendered according to new values automatically.
I'm not sure why you got that behavior with the first list, then. If you are able to share the .OML (or part of it) I can take a look and try to figure it out.