[FONT=Times New Roman][SIZE=3]Hey everyone,[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]Can i use multiple HTTPService in one flex application?[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]I have tried the following but it can have only one creationComplete= " "[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Is their any work around?[/FONT][/SIZE]
[COLOR=black][FONT=Verdana]<?xml version=“1.0” encoding=“utf-8”?>
<mx:Application xmlns:mx=“http://www.adobe.com/2006/mxml” layout=“absolute” width=“1024” height=“800” backgroundColor=“white” creationComplete= “menu.send()”>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var menuarray:ArrayCollection;
private function menuhandler (event:ResultEvent):void
{
menuarray=event.result.response.data.row;
}
[Bindable]
private var ordersarray:ArrayCollection;
private function ordershandler (event:ResultEvent):void
{
ordersarray=event.result.response.data.row;
}
]]>
</mx:Script>
<mx:HTTPService id=“menu” url=“http://localhost/kassa/menu.php?method=FindAll” result=“menuhandler(event)” />
<mx:HTTPService id=“orders” url=“http://localhost/kassa/orders.php?method=FindAll” result=“ordershandler(event)” />
<mx:DataGrid y=“68.95” editable=“false” enabled=“true” width=“490” height=“682.05” fontFamily=“Times New Roman” fontSize=“25” id=“menudataGrid” dataProvider="{menuarray}" left=“10”>
<mx:columns>
mx:DataGridColumn headerText=“id” dataField=“id” width=“50”/>
<mx:DataGridColumn headerText=“name” dataField=“name” />
<mx:DataGridColumn headerText=“price” dataField=“price” width=“100”/>
</mx:columns>
</mx:DataGrid>
<mx:DataGrid y=“68.95” width=“490” height=“392.05” id=“ordersdataGrid” dataProvider="{ordersarray}" fontFamily=“Times New Roman” fontSize=“25” editable=“false” enabled=“true” right=“10”>
<mx:columns>
<mx:DataGridColumn headerText=“id” dataField=“id” width=“50”/>
<mx:DataGridColumn headerText=“name” dataField=“name” />
<mx:DataGridColumn headerText=“price” dataField=“price” width=“100”/>
</mx:columns>
</mx:DataGrid>
</mx:Application>[/FONT][/COLOR]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]