0 Replies Latest reply on Nov 24, 2008 2:20 AM by premadas



      Hi All,
      I have two comboboxes.I'm getting the data from XML file.Xml file contains "Home,Office,Sports,Personal" values are there.

      For one combobox i want to display the content of xml file and for other combobox i need to diplay the xml file content and i want to add another element i.e "All".

      I tried but "All" element is coming both comboboxes.

      How to do that...
      Here am sending my code.Can u rectify the code.

      MXML file...

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="cate.send();">

      import mx.collections.ArrayCollection;
      import mx.rpc.events.ResultEvent;

      public var arr:ArrayCollection;

      public var arr1:ArrayCollection;

      private function resultHandler(event:ResultEvent):void
      /* arr = new ArrayCollection();
      arr = event.result.categorylist.categoryitems;
      firstcategory.dataProvider = arr; */
      arr1 = new ArrayCollection();
      arr1 = event.result.categorylist.categoryitems;
      secondcategory.dataProvider = arr1;


      <mx:HTTPService id="cate" url="Combo.xml" result="resultHandler(event);"/>
      <mx:Panel width="100%" height="100%">
      <mx:ComboBox id="firstcategory" dataProvider="{cate.lastResult.categorylist.categoryitems}" labelField="categoryname"/>
      <mx:ComboBox id="secondcategory" labelField="categoryname"/>

      XML file
      <?xml version="1.0" encoding="UTF-8"?>

      Thanks in Advance,