If I have multiple records in the response I get an ArrayCollection
however if I have only 1 record I get an ObjectProxy. I'm not sure if
specifying the resultFormat would resolve this and if so, which format
is appropriate. I typically map the results to an ArrayCollection which
is the dataProvider for a datagrid.
Perhaps I should just map the datagrid .dataProvider to the
HttpService.lastResult...
Any suggestions or experience with this. My code is below:
<mx:HTTPService id="QueryService"
result="QueryService_resultHandler(event)" />
...
protected function QueryService_resultHandler(event:ResultEvent):void
{
try { GridDataArray = event.result.resultset.record;
}catch (e:*) { GridDataArray = new ArrayCollection(); }
mydatagrid.dataProvider = GridDataArray;
}__,_
---------------------------------- results with std xml header removed
-----------------------------------------------------
<resultset>
<record order__therapy="OT" name="Landers, Ivee"
time__id="3" time__label="08:00" id="3" order__resident__payor="3"/>
</resultset>
._,___