[Event System] Return values from Popups

Forge Component
Published on 17 Feb by leonardo.fernandes
32 votes
Published on 17 Feb by leonardo.fernandes
Hi.  I have been struggling to work out how to pass a non-text value back from a popup.  In my case I want to pass an entity indentifier.  The problem is that I can't find a way to use Invoke, Trigger or InvokeNotifyWidget since those each require either an EventHanderId, a ParentWidgetId or WebblockRuntimeId.  With a popup the event I am trying to fire is in the parent screen, not in the popup screen, and there are no webblocks involved.  I have tried to pass a container id (for the container in which the event is located) as an input param to the popup screen, but throws an exception when the InvokeNotifyWidget tries to use it.

I have also tried using ProvideArgumentEntityIdentifier and GetArgumentEntityIdentifier without actually having an EventHander anywhere, and that raises another exception (apparently missing an Int32 event handler id).

I have been thru the events system examples and can't find any popups in there.  The examples are all dealing with components of (eg webblocks within) the same screen.
It is done by OnNotify. Check this very complete example.
Thanks.  Yes I am familiar with the standard Popup, Notify pattern.  But I was hoping to use the events system in order to pass back a typed entity identifier rather than being limited to passing back a text value and having to cast around that.
Hello. The EventSystem does not work that way with popups.

The notify from popups is actually a javascript message being sent from one web page (which is the popup page inside an iframe) to another web page (which is the actual page in the web browser). This message has to be sent through javascript, because there's no way to send messages from one web page to another on the server side.

The best way to go for popups, unfortunately, is to have type convertions from text to the type you need.
OK, well at least that clears up why I could find no examples of the events system being used with Popups.  Appreciate the background.  Thanks.