If you are using parseley or caingorm framework for your flex application then you may probably face Dependency Injection problem in popup panel.I feel code relationship disconnected if you use popup in Cairngorm framework.And Special handling required if you use popup in Cairngorm framework.
I faced this problem in my flex application and I used Cairngorm PopUpWrapper to solve this problem.
How to Use Cairngorm PopUpWrapper
Step1: Download the popupParsley-1.10.swc,popup-1.10.swc
Step2:Copy and Paste in Build Path.
Step3:
Declare the context
Inject
[Bindable]
public var context:Context;
Add the below code in <fx:Declaration> section
<fx:Declarations>
<spicefactory:Configure/>
<cairngorm:PopUpWrapper open="{}" id="popup" >
<pres:NMSChangePasswordPanel popUpWrap="{popup}"
id="popUpId" />
<cairngorm:behaviors>
<cairngorm:AddPopUpToParsleyContext
context="{context}"/>
</cairngorm:behaviors>
</cairngorm:PopUpWrapper>
</fx:Declarations>
Step4:
Add the following line if you want to open popup window
popup.open = true;
Step5:
Add the following line if you want to close popup window
popup.open = false; 