How does the ajax refresh work in Outsystem? Does it give an internal outsystem server call?

Scenario - 

Web screen has a button "Submit", on click of Button disable it and open a popup having the option "Back"

On click of "Back", the "Submit" button should be enabled.

What is a good approach here using ajax refresh or external javaScript and why?

Hi Neha,

First rule of traditional Web Apps: use as little JavaScript as possible. Always use Ajax Submit and Ajax Refresh. Apart from that, you won't be able to use JavaScript to call the server in any OutSystems supported way, so really, don't do that.

Note that in your scenario there's no need to disable the button, as the pop-up will prevent any clicks on the main screen.

Neha Agrawal wrote:

How does the ajax refresh work in Outsystem? Does it give an internal outsystem server call?

Scenario - 

Web screen has a button "Submit", on click of Button disable it and open a popup having the option "Back"

On click of "Back", the "Submit" button should be enabled.

What is a good approach here using ajax refresh or external javaScript and why?

Hi Neha,


The Ajax Refresh is used when you need to refresh some data or some widget/container.


This is a documentation who will help you: https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Implementing_Logic/Web_Logic_Tools/Ajax_Refresh


One Note, the documentation is to Version 11 but in version 10 is the same way and description.


Cheers,

Thiago S. Mari


Hello Neha!

Ajax refresh is used to refresh a named component in the page, from a server action.

Configure the "AjaxSubmit" Method on button "Submit", and use a Popup_Editor widget to select an action to be call when you arrive from the Popup. In this selected action, you use the Ajax Refresh, pointing to the page component that you need to refresh.

On the Popup "Back" action use Popup_Editor_Close to close the popup.

If you need to send parameters back to the page, use Popup_Editor_Notify on Popup with the parameter, and in the page use NotifyGetMessage to receive it.


Best regards,

Gonçalo