> So in the above example I expect the flex object the struct maps to client side
> contains two array collections:
>
> struct
> {chart ,comments}
it should.
> How to I access these values without creating a specific class?
private function handleChartData(event:ResultEvent):void{
comments.dataProvider = event.result.comments as ArrayCollection ;
}
might be Array instead of ArrayCollection. also watch out for CAsE coming from cf.
nikos101 - 29 Aug 2008 11:18 GMT
might be Array instead of ArrayCollection. also watch out for CAsE coming from
cf.
It should be an ArrayCollection becase there are multiple column in the table
being queried.
I still am not getting anything showing up on my charts when i do
comments.dataProvider = event.result.comments as ArrayCollection ;
However when I don't return a stuct as shown below my datagrid works fine:
<cffunction name="getChartData" access="remote" returntype="query">
<cfargument name="userID" required="true" type="numeric">
<cfquery name="chart" datasource="#datasource#">
select *
from staff_charts_data where userID = <cfqueryparam
value="#arguments.userID#" cfsqltype="cf_sql_integer">
</cfquery>
<cfquery name="comments" datasource="#datasource#">
select comment,dateAdded
from staff_charts_comments where userID = <cfqueryparam
value="#arguments.userID#" cfsqltype="cf_sql_integer">
</cfquery>
<cfset flash.result = comments>
<cfreturn flash.result>
</cffunction>
comments.dataProvider = event.result as ArrayCollection ;
btw Thanks very much for your gelp so far Paul :)