Link to home
Start Free TrialLog in
Avatar of thebellman
thebellmanFlag for United States of America

asked on

Flex dropdownlist displays [object][object]

I'm having trouble getting a drop-down list to display the values from an ArrayCollection.  The dropdown displays [object][object],[object][object] etc..  This would normally indicate that the label isn't set - but I can't see what is happening wrong.

This is the trace of my ArrayCollection:

(mx.collections::ArrayCollection)#0
  filterFunction = (null)
  length = 1
  list = (mx.collections::ArrayList)#1
    length = 1
    source = (Array)#2
      [0] (mx.collections::ArrayCollection)#3
        filterFunction = (null)
        length = 4
        list = (mx.collections::ArrayList)#4
          length = 4
          source = (Array)#5
            [0] (Object)#6
              label = "LIFE_LAPSE_MASS_SHOCK"
            [1] (Object)#7
              label = "MKT_FX_SHOCK_DN_DKK_EUR"
            [2] (Object)#8
              label = "MKT_SPD_WIDENING_SHOCK"
            [3] (Object)#9
              label = "N_LIFE_LAPSE_MASS_SHOCK"
          uid = "A68C2B85-91F0-E15F-CFF5-900BA52F1BB6"
        sort = (null)
        source = (Array)#5
    uid = "81D0DA94-1B86-6CDB-DB5D-900BA53314CE"
  sort = (null)
  source = (Array)#2

I'm getting the arraycollection from a web service :
scenAC = new ArrayCollection(ArrayUtil.toArray(event.result.Streams._WEBOUT.Value.TABLE.SCENARIOS));

and setting the dataprovider and label:

scendd.dataProvider=scenAC;
scendd.labelField='label';

<s:DropDownList  id='scendd' x="139" y="20" width="163"  enabled="false"/>

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thebellman

ASKER

Thanks!