2 Replies Latest reply on Mar 1, 2010 9:58 PM by John Hall

    Spark List SelectedItems Binding

    John Hall Level 4

      I realize that the new list control uses a vector to represent selectedItems.  So in my VO for timeslots (sports scheduling app), I have a type of

       

      private var _allowedDivisions : Vector.<Object> = new Vector.<Object>;

       

      That seems to store OK but when I try to bind that value back to the list as in

       

      divisionList.selectedItems="{timeslotPM.currentTimeslot.allowedDivisions as Vector.&lt;Object&gt;}"

       

      or

       

      divisionList.selectedItems="{timeslotPM.currentTimeslot.allowedDivisions as Vector.<Object>}"

       

      or

       

      divisionList.selectedItems="{timeslotPM.currentTimeslot.allowedDivisions as Vector}"

       

      or

       

      divisionList.selectedItems="{timeslotPM.currentTimeslot.allowedDivisions}"

       

      none of them seem to bind properly. (BTW, yes the private variable above is in a Bindable class and has a public getter and setter and all other properties of the vo like start time, end time, description etc are binding to their respective controls fine). How do I reset the selectedItems on the control if I have the values  of them stored in a vector?

       

      Thanks.