Ajax Refresh to a screen

Ajax Refresh to a screen

  

hi there, 

I have a combo box and when change  want to ajax refresh its web screen. Unfortunately, the web screen can not be selected. On the other hand, I read this document:


So, how to enable to refresh a web screen?

thank you

Solution

Hello Pasar,

I will say that, and I might be wrong, that this is a mistake of the documentation.

It is not possible (afaik) to AJAX REFRESH a web page. Probably is a mistake in the documentation, as it is possible to AJAX REFRESH a Web Block, and in this case, the preparation of the Web Block will be executed.

If you want to refresh the whole page (including re executing the preparation), you can end the Screen Action with a Destination to the current page.

You can also put the whole page content in a Container, give it a name and refresh it.

Which one to use will depend on what you want to accomplish.

Cheers.

Solution

Pasar Anyar wrote:

hi there, 

I have a combo box and when change  want to ajax refresh its web screen. Unfortunately, the web screen can not be selected. On the other hand, I read this document:


So, how to enable to refresh a web screen?

thank you

Hi,

You change a combo box and you want to Refresh the all page (including the combo box)?

Seems a strange behavior. it's better to think first in what we want to achieve and not in solving specifically your technical challenge.

Can you please explain the business scenario?


Thank you very much,

In the preparation action, i call an action, and the outputs of the action are shown in the screen. 

Then when the combo box changes, i need to get other outputs values based on the value in the combo. So, i need to call the action again that is in the preparation action.

regards,


Hi Pasar,

In case you want to refresh only a part of the screen, check this documentation topic.

Hope it helps!

Pasar Anyar wrote:

Thank you very much,

In the preparation action, i call an action, and the outputs of the action are shown in the screen. 

Then when the combo box changes, i need to get other outputs values based on the value in the combo. So, i need to call the action again that is in the preparation action.

regards,


Pasar, 

It will not work, as the form will not fetch again the data from the source.
In this case, in the OnChange Screen Action associated with the combo box, call the Action that return the data, assign it to the Form record and refresh the form.

Cheers.


Pasar Anyar wrote:

Thank you very much,

In the preparation action, i call an action, and the outputs of the action are shown in the screen. 

Then when the combo box changes, i need to get other outputs values based on the value in the combo. So, i need to call the action again that is in the preparation action.

regards,


Hi Pasar,

Maybe the best way to do what you want is to create an action, call it on the combo on change and pass the value as an input of tht action and them get the other outputs.

regards

Thank you very much Sir,

I have changed the action that returns 5 outputs ( a procedure) to change only one output (function) and as you suggest it works.

regards,


Pasar Anyar wrote:

hi there, 

I have a combo box and when change  want to ajax refresh its web screen. Unfortunately, the web screen can not be selected. On the other hand, I read this document:


So, how to enable to refresh a web screen?

thank you

Hello Pasar,

You found a bug in the documentation. What you can do is refresh a Web Block, not a Web Screen. Thanks to you and Eduardo, we updated the documentation:


https://success.outsystems.com/Documentation/10/Reference/Logic/Implementing_Logic/Web_Logic_Tools/Ajax_Refresh