4 Replies Latest reply on May 23, 2007 11:37 AM by MacAnthony

    ComboBox with HTTPService dataprovider

    MacAnthony
      What I currently have is a comboBox that uses an httpservice dataprovider that is sending xml data. I got that to work and it brings in my list. What I can't seem to figure out is how to reference the selected data or label for that combobox then.

      The data would be similar to:
      <departments>
      <department>ALL</department>
      <department>Accounting</department>
      <department>Administration</department>
      <department>Engineering Services</department>
      <department>Engineering Technology</department>
      <department>Enterprise Technology</department>
      <department>Human Resources</department>
      <department>Information Systems</department>
      <department>Reprographics</department>
      </departments>

      and the flex code is:
      <mx:HTTPService
      id="deptData"
      url="dept_xml.php"/>

      and the combobox is:
      <mx:ComboBox id="deptCombo" dataProvider="{deptData.lastResult.departments.department}" width="200" />

      I've tried all sorts of things like deptCombo.selectedItem.data , deptCombo.selectedItem.label deptCombo.selectedItem.department but I can't figure out what to do to get it to work.