Tracy, as always, you rock.  Thanks for the help.  Can you point me 
in the right direction as to where to find information on how to use 
a labelFunction()?  Sorry to be so thick.

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> "...as the data provider for a grid, and it works perfectly...it's 
just
> when I try to use it as a data provider for a list, it doesn't 
work ..."
> 
> Sounds like you should verify your labelField property or use a
> labelFunction().  A labelFunction will let you debug the actual item
> object.
> 
>  
> 
> Tracy
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Lisa Lee
> Sent: Thursday, January 18, 2007 3:45 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Populating List with Data From Web Service
> 
>  
> 
> Thanks very much for the info, Clint. If I return a query instead 
of 
> an array, do I still cast it as an ArrayCollection? It doesn't seem 
> to be working for me. The other puzzling thing is that I can use my 
> current code and use the result as the data provider for a grid, 
and 
> it works perfectly...it's just when I try to use it as a data 
> provider for a list, it doesn't work.
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> , "Clint Tredway" <grumpee@> 
> wrote:
> >
> > Web services are not returned liked that. My advice is to use 
> remoting with
> > CF and your code will work the way it is now.. also, you can 
return 
> the
> > query itself without making an array to send back.
> > 
> > On 1/17/07, Lisa Lee <lisalee@> wrote:
> > >
> > > Hi,
> > >
> > > I have a list that I want to populate with data from a CFC, but 
> all I
> > > get with my current code is a list with every row 
reading '[object
> > > Object]' instead of actual data from my web service. The web 
> service
> > > should just be returning an array (also, is an array the best 
way 
> to
> > > return data for a list?).
> > >
> > > Main code of CFC that returns data:
> > >
> > > <cfquery name="GetServiceTypes" datasource="STO5">
> > > SELECT
> > > pkServiceTypeID,
> > > Description
> > > FROM tblSYS_ServiceTypes WITH (NOLOCK)
> > > ORDER BY Description
> > > </cfquery>
> > >
> > > <cfset ServiceTypeArray = ArrayNew(1)>
> > >
> > > <cfoutput query="GetServiceTypes">
> > > <cfset ServiceTypeArray[CurrentRow] = StructNew()>
> > > <cfset ServiceTypeArray[CurrentRow].serviceTypeID =
> > > pkServiceTypeID>
> > > <cfset ServiceTypeArray[CurrentRow].description = Description>
> > > </cfoutput>
> > >
> > > <cfreturn ServiceTypeArray>
> > >
> > > Main elements of MXML that pertain to the list:
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
> <http://www.adobe.com/2006/mxml> "
> > > layout="absolute"
> > > creationComplete="perfManWS.GetServiceTypes.send();">
> > > <mx:Script>
> > > <![CDATA[
> > > [Bindable] private var serviceTypeDP:ArrayCollection;
> > >
> > > private function serviceTypeHandler(event:ResultEvent):void {
> > > serviceTypeDP = (event.result as ArrayCollection);
> > > }
> > > ]]>
> > > </mx:Script>
> > >
> > > <mx:WebService id="perfManWS"
> > >
> > > wsdl="http://development/dev1/workspaces/lisa/components/perfo
> <http://development/dev1/workspaces/lisa/components/perfo> 
> > > rmancemanagement.cfc?wsdl">
> > > <mx:operation name="GetServiceTypes"
> > > result="serviceTypeHandler(event)">
> > > <mx:request>
> > > <UName>xxx</UName>
> > > <UPassword>xxx</UPassword>
> > > </mx:request>
> > > </mx:operation>
> > > </mx:WebService>
> > >
> > > <mx:List id="stComboList"
> > >
> > > dataProvider="{serviceTypeDP}"
> > >
> > > labelField="description"
> > >
> > > allowMultipleSelection="true"/>
> > >
> > > </mx:Application>
> > >
> > > 
> > >
> > 
> > 
> > 
> > -- 
> > http://indeegrumpee.spaces.live.com/
> <http://indeegrumpee.spaces.live.com/> 
> >
>


Reply via email to