It seems to me that you need to specify a property of the model as
the list's dataprovider, instead of using the model itself. I
haven't tested this, but I'd be curious to see what happens if you
try the following changes:
<mx:Model id="listData">
<things>{listService.lastResult.things.thing}</things>
</mx:Model>
<mx:List
id="list"
dataProvider="{listData.things}"
labelField="name" />
--- In [email protected], "g_odds" <[EMAIL PROTECTED]> wrote:
>
> I am attempting to populate a List from Model filled by the result
of
> an HTTPService. However, the list only shows one entry as "[object
> Object], [object Object],..". As far as I am aware that is the
result
> of a toString() on a collection. But why is the List not using that
> collection to populate itself properly (as I want it to, hehe).
>
> Thanks in advance for any help.
>
> Graham
>
>
> The code:
>
> ...
> <mx:HTTPService
> id="listService"
> url="..."
> />
> <mx:Model id="listData">
> {listService.lastResult.things.thing}
> </mx:Model>
> <mx:List
> id="list"
> dataProvider="{listData}"
> labelField="name"
> />
> ...
>
>
> and the XML that results from the HTTPService send:
>
> <things>
> <thing>
> <name>MyName</name>
> <value>MyValue</value>
> <thing>
> ...
> <things>
>