troubleshooting Question

Popup Window not executing creationComplete="initApp()"

Avatar of sfletcher1959
sfletcher1959Flag for United States of America asked on
Apache Flex
11 Comments1 Solution1517 ViewsLast Modified:
I have a popup window that only executes creationComplete="initApp()" the first time the popup is called. When the popup is closed and opened again the creationComplete="initApp()" doesn't run again.

I need to force "initApp()" to run each time the popup is opened in order to get data via an HTTPService.


<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx=""
	 dropShadowEnabled="true" shadowDistance="10" 
	 borderStyle="solid" width="540" height="100%"
	 creationComplete="initApp()" layout="vertical" title="Chart Filters">
		PROGRAM NAME ViewFilters
			Purpose: Called from the ChartDesigner Form.  Allows Adding / Editing of Filters
        	import mx.rpc.http.HTTPService;
        	import mx.managers.PopUpManager;       	
        	import mx.controls.Alert;
            import util.ModelLocator;
            private var dataCollection2:XMLList;
			public var model:ModelLocator = ModelLocator.getInstance();
  			public function initApp():void
    					getChartFiltersService.send()  //get the data now  						
			 private function getResult(event:ResultEvent):void
			 			var result:XML = event.result as XML;	
                        dataCollection2 = result..filter as XMLList;
			 public function updateGrid():void
			  				ta3.text = dgFilters.dataProvider.getItemAt(0).fvalue;
			private function handleCancel() : void {			
    <mx:HTTPService id="getChartFiltersService"
		<mx:DataGrid id="dgFilters"
      	dataProvider="{dataCollection2}" width="100%"> 
            	<mx:DataGridColumn dataField="ffield" headerText="Field" width="60" />
            	<mx:DataGridColumn dataField="ftype" headerText="Filter Type" width="40" />            
         <mx:TextArea id="ta3" text="{dgFilters.selectedItem.fvalue}"  editable="false" width="100%" height="88" />     
		 <mx:TextArea text="{model.currentChartId}"/>
         <mx:ControlBar id="controlbar1" horizontalAlign="right" verticalAlign="bottom">
			<mx:Button id="searchButton" label="Cancel" click="handleCancel()"/>    
Sr. Software engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros