IsPopupScreen() function? detecting whether a webscreen is loaded in a popup

IsPopupScreen() function? detecting whether a webscreen is loaded in a popup

Is there a way (other than setting a boolean) to detect whether a webscreen is opened in a popup or not?

The closing (notification) sequence is different and it would be nice to be able to let the webscreen make the correct decision without any parameter.
(Low coupling / High cohesion approach - Carlo Ghezzi)
Hi Eric

From the server point of view, a web request from a full page, or a popup window/iframe, it's completely indistinguishable. So there's no way for the Agile Platform to determine if this is a full page request, or a popup request. It has to be done by the developer, using input parameter variables, in which the common approach is an optional boolean input parameter, only used when the page is called from within a popup.

Additionally, you could try using different entry points, and server side redirects according to the entry point used. This way you'll have a more clear URL.


Miguel João
Hi Miguel,

From my point of view, the 'popup parameter' (whether something is opened in a popup or not) is something that:
1. the outsystems platform is already aware of.
The platform knows which screen to open in a popup and from that popup the platform should be able to pass that popup parameter.
(I consider this a parameter that can be returned by a function that checks the screen state)
2. is something that can be really useful for e.g. (re)using edit and show screens.

To me a screen in a popup is in a different 'state' than a normal screen is.
Currently another popup cannot be opened from a popup which creates the need of knowing whether you're in a popup or not.
Perhaps it's and idea ,for the outsystems developers, to add a few screen states. (in_popup / minimized / maximized / inactive / active)
Hi Eric

I understand your point of view, and I'll forward your suggestion to the OutSystems R&D team, so that this new  functionality is included in a future version of the Agile Platform.

On that note, an even that from the end-user point of view, a popup screen is different from a normal full page screen, you should also consider that the popup widget is in fact a web widget build on top of the Agile Platform as a component, and doesn't belong to the Platform's runtime. Since the widget it self exists on a higher layer from the Platform, it's at the widget level that the distinction between a popup screen and a normal full page screen exists. When we go the layer below, we'll find that the Agile Platform ( and the application server, for that matter) treats both requests equally.

If you analyze the popup widget available on the RichWidgets espace, you'll find that the popup is an iframe which renders a web page. So that web page doesn't know if it's being rendered by a full normal web page, or a popup iframe, unless an input parameter is used. This is also true for any state, like maximized or minimized, since this information must be passed onto the web request by the web browser in some fashion.

Thanks for the suggestion.

In the meanwhile, the solution, as you've pointed out, is to use a boolean input parameter, and set it when you want to open the page in with a popup widget.


Miguel João
Hi Miguel,

Thanks for your forward to the R&D team.

I understand how the popup screen is handled by both the client (browser) and the interpreter (the Webserver in this case) and I understand your explanation.
However in my opinion the current technical solution limits the functionality and simplification of the use of popup's in the Service Studio IDE.

The popup screen is very functional because it forces the focus on a certain screen which limits the users input options and removes all possibly disturbing elements from the view.
One of the things that would also be very nice future implementation is the ability to open a new (focussed) popup screen from another popup screen.

Thanks for your feedback and your reply.