Hi Experts,

How can i use the Ajax refresh from Menu Web block using RichWidgets\DropDownMenu to refresh a Web screen.


Thanks and Best Regards




Solution

Hello Joshua,

Are you using OutSystems 11 or a previous version?

In any case, you can't do it "directly", as the web block and its parent is kind of "isolated".
But you can notify/trigger an event in any block to alert its parent that he needs to do something.

So, in O11, you can trigger an event (you need to create the event in the Web Block Menu). If you don't want to oblige every page to deal with the event, you can make it Not Mandatory. This way, only in the pages where it's important to listen to the event, you add a Handler (that is just a Screen Action in the Parent, in this case, the page).

The Handler will be called using Ajax Submit, so you can Ajax Refresh anything in the Parent.

If you need more information on Events, take a look here: https://www.outsystems.com/learn/lesson/1787/web-blocks/?LearningPathId=2

And before you ask, yes, you can change the Menu Web Block (usually... rs). 

Cheers.

Solution

Eduardo Jauch wrote:

Hello Joshua,

Are you using OutSystems 11 or a previous version?

In any case, you can't do it "directly", as the web block and its parent is kind of "isolated".
But you can notify/trigger an event in any block to alert its parent that he needs to do something.

So, in O11, you can trigger an event (you need to create the event in the Web Block Menu). If you don't want to oblige every page to deal with the event, you can make it Not Mandatory. This way, only in the pages where it's important to listen to the event, you add a Handler (that is just a Screen Action in the Parent, in this case, the page).

The Handler will be called using Ajax Submit, so you can Ajax Refresh anything in the Parent.

If you need more information on Events, take a look here: https://www.outsystems.com/learn/lesson/1787/web-blocks/?LearningPathId=2

And before you ask, yes, you can change the Menu Web Block (usually... rs). 

Cheers.

Thank you for your instructions. But I had an issues about Ajax Refresh. This is my case In the Parent Screen has many Web block and I want to refresh specific Web block. But in the Ajax Refresh does not show it. Can you help me instruct to the schema Refresh Web block from parent screen and the screen action in parent screen can call screen action in the Web block

Thanks,

Tuan

Hi Tuan,

Any element you want to refresh must have a NAME defined (in its properties).
Otherwise, it does not appear in the list of the Ajax Refresh.

Cheers.

Hi Eduardo,

I am a newbie. Can you help me to explain clearly. How to define Name in its properties.

Thank you for your replying.

Tuan.

Hello Tuan,

Select the Web Block and in the Properties panel, there is a property called Name. Give a name to the web block and then you will be able to choose it when creating the Ajax Refresh.

If you did not, I recommend the online training, as this is viewed there :)

Cheers.

Hi Eduardo,

I found it. Thank you so much.

Tuan.