i am tring to load multiple tables on a flex page and cant seem to figure out how to use multiple remote objects.
Below is my coldfusion
<cfcomponent output="false">
<cffunction name="getVacancies" access="remote" returntype="query">
<cfset var = qRead ="" />
<cfquery datasource="sqlexpress" name="qRead">
SELECT Status, SFIELD6
FROM dbo.VacantSumm
</cfquery>
<cfreturn qRead />
</cffunction>
<cffunction name="getVacancyTotals" access="remote" returntype="query">
<cfset var = vRead =""/>
<cfquery datasource="sqlexpress" name="vRead">
select Total, Status
from dbo.VacancyTotal
</cfquery>
<cfreturn vRead />
</cffunction>
and now for my AS:
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var acVacancies:ArrayCollection;
private var VacancyTotals:ArrayCollection;
private function initApp():void
{
VacancyGateway_RO.getVacancies();
VacancyGateway_RO.getVacancyTotals();
}
private function getVacanciesRO_Handler(event:ResultEvent):void
{
acVacancies = ArrayCollection(event.result);
}
private function getVacancyTotalsRO_Handler(event:ResultEvent):void
{
VacancyTotals = ArrayCollection(event.result);
}
I know kinda where my is, i think. the two arraycollections, any help on this would be great and highly appreciated.