0 Replies Latest reply on Oct 19, 2009 12:55 PM by F.Bowman

    ComboBox Binding

    F.Bowman

      I'm trying to attach some information from a ComboBox in an HTTP request. The problem is that everytime I go to the State where the ComboBox exists, I get some warnings from the compiler:-

       

      warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)

      warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)

      warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)

      warning: unable to bind to property 'data' on class 'Object' (class is not an IEventDispatcher)

      warning: unable to bind to property 'data' on class 'Object' (class is not an IEventDispatcher)

      warning: unable to bind to property 'data' on class 'Object' (class is not an IEventDispatche)

       


      This is the HTTP Request:-

       

      <mx:HTTPService

      id="

      scheduleYearRequest"

      url="

      {engineURL}"

      method="

      POST"

      resultFormat="

      text"

      result="handlerRequestResult(event);"

      fault="handlerRequestFault(event);"

       

      >

       

      <mx:request xmlns="">

       

      <action>scheduleYearRequest</action>

       

      <type>{download_type.selectedItem.data}</type>

       

      <user>{download_user.selectedItem.label}</user>

       

      </mx:request>

       

      </mx:HTTPService>

       

      This is the state:-

       


      <mx:State

       

      name="Download" basedOn="Authenticated">

       

      <mx:AddChild relativeTo="{panel2}" position="lastChild">

       

      <mx:TitleWindow x="150.5" y="63" width="320" height="240" title="Download ECS" layout="absolute" showCloseButton="true" close="currentState='Authenticated'">

       

      <mx:Form x="0" y="0" width="300" height="200">

       

      <mx:FormItem label="Employer:">

       

      <mx:ComboBox id="download_user" editable="false" enabled="true" dataProvider="{listUser}" change="downloadInteract('user')" />

       

      </mx:FormItem>

       

      <mx:FormItem label="Type:">

       

      <mx:ComboBox id="download_type" editable="false" enabled="false" dataProvider="{listType}" change="downloadInteract('type')" />

       

      </mx:FormItem>

       

      <mx:FormItem label="Year:">

       

      <mx:ComboBox id="download_year" editable="false" enabled="false" dataProvider="{listYear}" change="downloadInteract('year')" />

       

      </mx:FormItem>

       

      <mx:FormItem label="Month:" >

       

      <mx:ComboBox id="download_month" editable="false" enabled="false" dataProvider="{listMonth}" change="downloadInteract('month')" />

       

      </mx:FormItem>

       

      <mx:FormItem label="ID:" >

       

      <mx:ComboBox id="download_id" editable="false" enabled="false" dataProvider="{listID}" change="downloadInteract('id')" />

       

      </mx:FormItem>

       

      <mx:FormItem>

       

      <mx:Button id="download_download" enabled="false" label="Download" />

       

      </mx:FormItem>

       

      </mx:Form>

       

      </mx:TitleWindow>

       

      </mx:AddChild>

       

      </mx:State>


      The variable definitions:-

       

      [

      Bindable]

       

      private var listID:ArrayCollection;

       

      [

      Bindable]

       

      private var listMonth:ArrayCollection;

       

      [

      Bindable]

       

      private var listType:ArrayCollection;

       

      [

      Bindable]

       

      private var listUser:ArrayCollection;

       

      [

      Bindable]

       

      private var listYear:ArrayCollection;

       

       

       

       

      Additional code:-

       

      listID =

      new ArrayCollection([{label:"Select",data:"Select"}]);

      listMonth =

      new ArrayCollection([{label:"Select",data:"Select"}]);

      listType =

      new ArrayCollection([{label:"Select",data:"Select"},{label:"Export",data:"exports"},{label:"Upload",data:"uploads"}]);

      listUser =

      new ArrayCollection([{label:"Select",data:"Select"}]);

      listYear =

      new ArrayCollection([{label:"Select",data:"Select"}]);

       

       

       

      Can anyone share any insight into why I'm getting the warnings? Is there a way to bind the selectedItems so the HTTP request?