2 Replies Latest reply on Aug 1, 2007 5:10 AM by fragerdaz

    Combobox with RemoteObject ArrayCollection

    fragerdaz
      MySQL table with 2 fields
      -> RemoteObject fetches all the table's contents (SELECT * FROM table)
      -> ArrayCollection stores the fetched data (ArrayUtil.toArray();)
      -> Combobox lists the fetched data.

      I need to set the label property to only one of these fields.

      I've tried the following to no avail:

      quote:

      private function fetchRecettesHandler(event:ResultEvent):void {
      acFetchedRecettes = new ArrayCollection(ArrayUtil.toArray(event.result .fieldName));
      }
      OR
      private function fetchRecettesHandler(event:ResultEvent):void {
      acFetchedRecettes = new ArrayCollection(ArrayUtil.toArray(event.result ['fieldName']));
      }


      quote:

      <mx:ComboBox dataProvider="{acFetchedRecettes .fieldName}"/>
      OR
      <mx:ComboBox dataProvider="{acFetchedRecettes ['fieldName']}"/>