<?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
-->
<mx:Script>
<![CDATA[
import mx.rpc.http.HTTPService;
import mx.managers.PopUpManager;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import util.ModelLocator;
[Bindable]
private var dataCollection2:XMLList;
[Bindable]
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;
updateGrid();
}
public function updateGrid():void
{
ta3.text = dgFilters.dataProvider.getItemAt(0).fvalue;
}
private function handleCancel() : void {
mx.managers.PopUpManager.removePopUp(this);
}
]]>
</mx:Script>
<mx:HTTPService id="getChartFiltersService"
url="http://localhost/Magic94Scripts/mgrqispi94.dll"
method="POST"
useProxy="false"
resultFormat="e4x"
result="getResult(event)">
<mx:request>
<appname>Web_Dev_Procurement</appname>
<prgname>getFilters</prgname>
<arguments>param1,param2</arguments>
<param1>{model.currentChartId}</param1>
</mx:request>
</mx:HTTPService>
<mx:DataGrid id="dgFilters"
dataProvider="{dataCollection2}" width="100%">
<mx:columns>
<mx:DataGridColumn dataField="ffield" headerText="Field" width="60" />
<mx:DataGridColumn dataField="ftype" headerText="Filter Type" width="40" />
</mx:columns>
</mx:DataGrid>
<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()"/>
</mx:ControlBar>
</mx:Panel>
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”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.
Our community of experts have been thoroughly vetted for their expertise and industry experience.