Seems like you found an approach, but if you are interested in another idea, there is a really good thread on the Mate forums about how to approach popups in Mate. It includes some example code and discusses the best practices involved and why certain choices are being made:
Converting app with popups to Mate << Mate Forums
If I understand you correctly, here is some code to do what you need (adapted from that thread). It injects the result of an RPC call into the view (keeping the map agnostic of how the view displays that data), and the view will create a popup whenever there is data, and remove the popup whenever there is no data. The thread has further explanation of most of this code.
EventMap:
<Injectors target="{PopupParentView}">
<PropertyInjector destinationKey="rpcData"
source="{FooManager}" sourceKey="rpcData" />
</Injectors>
PopupParentView:
...
private var popup : UIComponent;
private var rpcData : Object;
private function onPreinitialize( event : Event ) : void {
BindingUtils.bindSetter(rpcDataChanged, this, "rpcData");
}
private function rpcDataChanged( value : Object ) : void {
invalidateProperties();
}
override protected function commitProperties( ) : void {
// two mutually exclusive branches: either the property can be interpreted as "show the popup"
// and the popup doesn't exist, or we shouldn't show the popup, but it does exist. all other
if ( rpcData != null && popup == null ) {
popup = PopUpManager.createPopUp(...);
} else if ( rpcData == null && popup != null ) {
// make sure to set the popup property to null
PopUpManager.removePopUp(popup);
popup = null;
}
}
</Script>
...