Popups are a little unique in how they use params, so I’ll cover both Popups and Embedded Views.
First:
Views will allow you to configure “input”/“output”/“input/output” params. The Designer has no way of knowing how you’re going to use the View down the road, so we don’t prevent you from configuring in any of those ways.
Input params can not be bound TO any value, but other values can be bound to them. They are read ONCE - during the View’s construction phase, and then they are essentially ignored, outside of your own references.
Output Params will ignore any incoming value at construction time, but Embedded Views can make use of this param (EmbeddedView.props.params['my_output_param_key']
) to read values you’d like to send out.
Input/Output params are a two-way communication to allow for seamless communication between the View, the Embedded View component, and the View which the Embedded View component contains.
Popups:
Now, this is where Popups are a bit different. If a View with an Embedded View has root.FlexContainer.EmbeddedView.props.params
as a property, then reading that value is easy; Popups are NOT attached to a View (this is a very important concept), so there is no way to reference any form of output param (although input params are used by the popup during its construction phase).
If you have a value you want to get out of a popup, you have two options:
- Set a session property based off of some action in the popup.
- Send a message from the Popup using system.perspective.sendMessage(), and then configure a listener in the View which invoked the Popup.