0
votes

i am trying to put data in to combo box from php page using http service .there are 2 data records in the php page but instead of displaying data it displays [object object] [object object] in the combo box list

here is the mxml code

@namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; {username.text}</username> {emailaddress.text}</emailaddress> </s:request>-->

                  private function send_data():void { 
          userRequest.send(); 
                  }           private function send_data1():void { 
          userRequest.send(); 
          //testlb.text="testsuccesss";
                      } 
              ]]>     </fx:Script>        <s:ComboBox x="197" y="305" width="414" height="32"
          dataProvider="{userRequest.lastResult.users.user}"
          labelField="data"   >
      </s:ComboBox>


   </s:View>

can you help me to indentify the problem

1
Are you sure that the property data is a string or at least has a sensible toString() method?Ohas
yes it is a string @oman Hassanfrancis dcunha

1 Answers

1
votes

Assuming your result is coming in XML format, you should use @ before the variable name you use in labelField.

Also, it would be nice to see more code since some of it looks cut off.