Hello,

I am trying to use the component pull to refresh in a mobile app (in the layout I have set the option to true and assigned a handler to the event OnPullToRefresh). 

Here is the problem, I am doing this in the home screen and the screen is built with web blocks.

In the pull event, I call a synchronization action, which will refresh all the local data.

But the changes are only visible if I navigate away and back to the screen. How can I tell the child web blocks to refresh themselves?

Another issue is the time that it stays in "refreshing mode". It does not show the weel until the end, it is hardcoded it seems.


Is this correct? Is there a proper way to overcome these problems?

Thank you



Hello Maria João,


Can you share your module so I can have a look? If you can't share the module can you take some screenshots so I can better understand how you're doing it?

Thanks!


Problem is the queries are at the web block level, how do I send a trigger to refresh it?

Thank you

Hi Maria,

We are coping with the same problem, did you perhaps solve this problem in the meantime and would you be willing to share it?

Thanks in advance!

Hi Maria João and Bart,

If you change an Input Parameter of your Blocks, it will trigger the OnParameterChange event of the Block. From there you could do your refreshes, no?

So, my suggestion would be:

  • Add an optional integer Input Parameter to your Blocks that need to react to sync.
  • Add an OnParameterChange event handler to your Blocks that refreshes the required info
  • On your Mobile Screen add a dummy Integer variable
  • on your Screen's OnSyncComplete event handler (or whatever the exact name is)
    • increment the local dummy variable - this will trigger the OnParameterChange of all the relevant Blocks

Jorge Martins wrote:

Hi Maria João and Bart,

If you change an Input Parameter of your Blocks, it will trigger the OnParameterChange event of the Block. From there you could do your refreshes, no?

So, my suggestion would be:

  • Add an optional integer Input Parameter to your Blocks that need to react to sync.
  • Add an OnParameterChange event handler to your Blocks that refreshes the required info
  • On your Mobile Screen add a dummy Integer variable
  • on your Screen's OnSyncComplete event handler (or whatever the exact name is)
    • increment the local dummy variable - this will trigger the OnParameterChange of all the relevant Blocks

I was missing the OnSyncComplete event in my solution, it works now!

Thanks!