[Web] Popup + service call

[Web] Popup + service call

  

Hi,


What I've tried:

    Worked: New Web Screen without the shared layout seen on the main screens, just an empty web screen with the only stuff that I want to see on the resulting popup. Together with a Popup_Editor widget I got myself a working popup.


   Didn't work: Same stuff as mentioned before plus a call to a REST Get Service which returns nothing. Calling this service will close the popup right after it's prompted on the screen. I'm 100% sure that calling this service is the only culprit of forcing the popup to close itself.


What I want:


-Prompt a popup by clicking on a link component.

-This popup needs an input parameter which, I don't really care if the input is the text I want to show on the popup or it is the whole item and once I'm on the popup, I have to call item.text.

-A service needs to be called, it doesn't matter if it's right before the popup is prompted on the screen or if the service is called once the popup is closed but this service has to be called no matter what.


Right now the input is an item identifier which is gotten from the current item on the TableRecord component. Also, this service will not return anything at all so it's only about calling it and letting it work by itself.


Thanks by advance, Jordi.



Jordi Gisbert Ponsoda wrote:

Hi,


What I've tried:

    Worked: New Web Screen without the shared layout seen on the main screens, just an empty web screen with the only stuff that I want to see on the resulting popup. Together with a Popup_Editor widget I got myself a working popup.


   Didn't work: Same stuff as mentioned before plus a call to a REST Get Service which returns nothing. Calling this service will close the popup right after it's prompted on the screen. I'm 100% sure that calling this service is the only culprit of forcing the popup to close itself.


What I want:


-Prompt a popup by clicking on a link component.

-This popup needs an input parameter which, I don't really care if the input is the text I want to show on the popup or it is the whole item and once I'm on the popup, I have to call item.text.

-A service needs to be called, it doesn't matter if it's right before the popup is prompted on the screen or if the service is called once the popup is closed but this service has to be called no matter what.


Right now the input is an item identifier which is gotten from the current item on the TableRecord component. Also, this service will not return anything at all so it's only about calling it and letting it work by itself.


Thanks by advance, Jordi.



Where do you call the REST-service? Because when I do a small test myself where I place the call in the preparation of the popup, everything seems to work fine.


Ah, I just recognized that when the REST-call results in an error, the popup indeed doesn't open. So please check if you encounter any errors calling the REST-endpoint, in ServiceCenter. 

Solution

Hi Jordi,

Pop-ups are just screens that open in a smaller window. There's really nothing that can close a pop-up but calling the RichWidgets Popup_Editor_Close Action. Have you debugged to see what happens?

Solution

Kilian Hekhuis wrote:

Hi Jordi,

Pop-ups are just screens that open in a smaller window. There's really nothing that can close a pop-up but calling the RichWidgets Popup_Editor_Close Action. Have you debugged to see what happens?

Well, following this tutorial ( https://www.outsystems.com/forums/discussion/8856/manually-creating-a-popup-window-web-screen/ ) and starting over again the popup thing, I got it working properly.


I seriously don't know what was forcing the popup to close itself, this time I just did it very carefully, step by step, from just a popup working to 

-Popup calling the simplest REST service I had around on the Preparation.

-Popup calling another REST service I had around on the Preparation with predefined values.

-Popup calling another REST service I had around on the Preparation with input values from previous screen.


Somehow, it is working..


Thank you all though.


Hi Jordi,

Great to see you got it resolved, even if you don't know what caused the problem in the first place. I personally have never had any problems with pop-ups, like I said, they behave like normal screens in most respects. The only exception I could think of is when you're not logged in (after a session time-out with an opened pop-up), you'll see the login page first in the pop-up, then switching to full screen.

Hi Jordi,

You can also check the Role permissions for your Popup screen, if the user doesn't have the necessary role, the observed behaviour is that the popup window opens and immediately closes.

Jorge Martins wrote:

Hi Jordi,

You can also check the Role permissions for your Popup screen, if the user doesn't have the necessary role, the observed behaviour is that the popup window opens and immediately closes.

Hi Jorge,

Nothing permission wise or session related (login) has been changed let's say I messed it up at some point.


Thank you for your tips, the same goes to you, Kilian, thank you for your support.