7 Replies Latest reply on Sep 19, 2006 7:38 PM by coderhead

    combo box prompt comming two times

    j2eesatish
      Hi,
      I am writing one java method to get all my countries and states. and i am handiling that event also properly and assigning the reslt object to one list. Like this i am placing same object for two list objects( two country combo boxes in different tabs). But i dont know why my prompt text in combo box is displaying two times. Can anybody have idea why it is happening for me?

      my sample code:
      <mx:RemoteObject id="dao" source="........">
      <mx:method name="getCountries" result="onGetCountries(event)" />
      <mx:method name="getStates" result="onGetStates(event)" />

      var dbCountries;
      var dbStates;
      function onGetCountries(oEvent){
      dbCountries = oEvent.result;
      }
      function onGetStates(oEvent){
      dbStates = oEvent.result;
      }

      <mx:ComboBox width="170" id="state" dataProvider="{dbStates}" prompt="-select state-" labelField="statename" change="getCity()" />

      my prompt "-select state-" is repeting in first two index places!!!

      Thanks