Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

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="http://www.adobe.com/2006/mxml"
	 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 mx.rpc.events.ResultEvent;
            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()"/>    
Avatar of zzynx
zzynxFlag of Belgium imageSr. Software engineer

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

This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answers