Reload or Redirect after closing popup

I need to reload my screen after closing my popup so I can check the new set variables.

I am trying to redirect after closing my popup. But I tried closing the popup with popup editor close and then redirecting using destination. But after the popup Closes I get no redirect. 

What's happening. 

-> user says open popup and performs an action. then assigns a variable and closes the popup, When the popup is closed i need to redirect it to my new page.

Alternatively : I can reload the page when the popup closes so I can check the new variables and perform my redirect based on the set variables. 


Currently when I close my popup that's where all processing ends.

Hi Rebelestablished,

I think you can find a solution to your problem here: https://www.outsystems.com/forums/discussion/46671/popup-editor-onnotify-event-never-fires/

Hope this helps.


Best regards,


Nicolas

Hi.

This must not be done in the Popup itself, but in the parent.

Use a Popup_Editor_Notify (with an empty string in the message). This will trigger the OnNotify of the Popup_Editor in the Parent screen, using Ajax Submit.

You can then refresh your page elements in the OnNotify action using Ajax Refresh, or end the OnNotify action with a Destination.

Cheers.

P.S. The Popup_Editor_Notify is kind of new. If you don't find it in the RichWidgets module, you can use the NotifyMessage or NotifyMessage_Deprecated.

Cheers.

Hi :),

In these kind of situations use the Popup_Editor_Notify Action from RichWidgets just before the Popup_Editor_Close. With this Popup_Editor_Notify, you specify a Screen Action and you put your refresh here..

I hope it helps.

Eduardo Jauch wrote:

Hi.

This must not be done in the Popup itself, but in the parent.

Use a Popup_Editor_Notify (with an empty string in the message). This will trigger the OnNotify of the Popup_Editor in the Parent screen, using Ajax Submit.

You can then refresh your page elements in the OnNotify action using Ajax Refresh, or end the OnNotify action with a Destination.

Cheers.

P.S. The Popup_Editor_Notify is kind of new. If you don't find it in the RichWidgets module, you can use the NotifyMessage or NotifyMessage_Deprecated.

Cheers.

Hi but my popup is already popping up in the parent parent screen. Then it is closed and doesn't redirect. 

Also I am not using Ajax Submit. It gives me an error. I am using Navigate. 


So far every thing is working fine except for when I close my popup and redirect. When I run the below. My popup closes and does not redirect

Hi,


Like I said, the Destination (navigation) can't be done in the action IN the Popup.

It has to be done in the OnNotify action of the Parent screen.
And for it to be called, you need to use the Popup_Editor_notify or NotifyMessage/NotifyMessage_Deprecated (depending on your server version). 

This action must be called before the Popup_Editor_close, and the Popup action must end with an END node.

Cheers.

P.S..

When you execute on of the three actions mentioned above, the OnNotify action (a screen action bound to the Popup_editor widget in the Parent Screen) will be executed as if it was called with Ajax Submit.

You probably don't even need to navigate to your page, just Data Refresh and Ajax Refresh the elements you want to update.

Cheers.

Eduardo Jauch wrote:

P.S..

When you execute on of the three actions mentioned above, the OnNotify action (a screen action bound to the Popup_editor widget in the Parent Screen) will be executed as if it was called with Ajax Submit.

You probably don't even need to navigate to your page, just Data Refresh and Ajax Refresh the elements you want to update.

Cheers.

Hi Eduardo I changed my navigate method to submit and now I am getting the correct flow that I want. But I am getting this error on load.

My Popup widget is linked to the Login link.

If I change Ajax Submit to Navigate the popup works fin but then I am unable to redirect after closing the popup.

--

I have to redirect with a destination after my Editor notify and Editor close because if I don't the the editor notify and editor close does nothing. Which is now giving me my popup as a whole screen.

--

--

--

If I don't add my redirect the popup notify and close does nothing. So technically I am just redirecting straight to the page.

--

Here's my popup. It's layout is Popup. And name is also set to Popup

Hi Rebel,

You're not listening to me ;) lol

In the Popup Action, use the Popup_Editor_Notify (or NotifyMessage or NotifyMessage_Deprecated, depending on the version of your platform). Pass an empty string (if you don't want to send anything).

Then, in the OnNotify screen action, you have access to your page:

The action has access to everything in the parent screen, and as it is executed with Ajax Submit, you will be able to do Data Refresh and Ajax Refresh.

If necessary, in this OnNotify handler (parent screen action), you can perform a navigate).

Cheers.

P.S: Do not use submit in a Popup if you pretend to close it... It kills the Popup_Editor_Close.


Solution

Hi,


Here is an example of how to redirect from the OnNotify "after" closing the Popup

Cheers

Solution

Eduardo Jauch wrote:

Hi,


Here is an example of how to redirect from the OnNotify "after" closing the Popup

Cheers

makes so much sense now oh my word :D Thank you so much!! :D

Been able to to follow the process through really helped me. Thank you.