Refresh Blocks in Mobile. Why we don´t have Refresh action in flow like on Web?

Refresh Blocks in Mobile. Why we don´t have Refresh action in flow like on Web?

  

Hi,

Why we don´t have Refresh action in flow like on Web?

How can i refresh a Container using a client action?



Hi Louis,

If you just change the variable, or what ever you are using, you should see whatever changes should be made based on the value of the variable without refreshing.

What exactly are you trying to do?

Justin

Justin,

Im building a Chatbot.

In HomeScreen, i have 2 reusable blocks (ChatMsg, ChatOptions) The reusable blocks receive 2 input parameters (DialogId and DialogStatus) from HomeScreen. 

ChatMsg are in "Content" section of HomeScreen and ChatOptions are on "Footer" Section.

After click on a button on ChatOptions, i need Refresh Data Fetched at ChatMsg Block, change HomeScreen Inputs Paramenters and refresh data fetched at ChatOptions.

In fact, i need the blocks on HomeScreen updated, after i click on a button at ChatOptions block.

Any ideia? How refresh the blocks inside HomeScreen like an ajax refresh?

 Thanks!

Louis,

The web blocks should be reactive in mobile. Changing the input parameters should be all you need to do, without needing any refreshing like a ajax refresh in a web application.

As soon as you change the variable that controls the content, you should see the changes without any further action.

Justin

I'm having the same issue. The thing is that my web block only has the "ItemId" as input parameter, and lists all elements from the conversation associated to that item, so in fact the input parameter never changes. 

What is the best way for me to refresh the block, having that into account?

Maria

MariaP,

Take a look at this document in Mobile exemple.

You need use event handlers!. 

Louis Springer wrote:

MariaP,

Take a look at this document in Mobile exemple.

You need use event handlers!. 

By "this", you mean...? I think you forgot the attachment/link :)


Hello Louis,

By looking at your scenario, I would suggest you to create a block event in the ChatOptions that is triggered when you click the button inside the block. In the HomeScreen you can create an event handler for this new block event where you can change ChatOptions or ChatMessages input parameter values.

Changing the block parameters will lead to a refresh of the UI of those blocks that depend on those parameters. If what you need is to force the refresh of block's data as a consequence of the parameters values changes, you can use the lifecycle event OnParametersChanged where you can make the refresh of any data.


Let me know if this helped you :)