Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 749193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:24:24+00:00 2026-05-14T14:24:24+00:00

I am dynamically populating a ComboBox with an HTTPservice calling an XML file. This

  • 0

I am dynamically populating a ComboBox with an HTTPservice calling an XML file. This all works dandy through the Flash Build 4 interface. Below is the ComboBox code:

 <s:ComboBox id="cbSockOptions" change="cbSockOptions_changeHandler(event)" 
    selectedIndex="1" 
    enabled="true" 
    creationComplete="cbSockOptions_creationCompleteHandler(event)" 
    labelField="Symbol">
       <s:AsyncListView list="{TypeUtility.convertToCollection(Operation1Result2.lastResult.Company)}"/>
 </s:ComboBox>

As stated, above is my code which populates the ComboBox. I would like to retrieve the seleted value from the ComboBox, but when I do I get the following output (e.g. when presented in a Label):

[object Company_Type]

I am currently using the following code to retrieve the value of the ComboBox

cbSockOptions.selectedItem;

All the reading I have done on the subject says that I must specify a ‘labelField’ in my ComboBox, which I do. However, I am still seeing the [object Company_Type] as an output, instead of the real value.

help! 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:24:24+00:00Added an answer on May 14, 2026 at 2:24 pm

    The labelfunction property only applies to displaying values in the ComboBox. There is a selectedLabel property of the ComboBox, but it is not marked as bindable. If you want to use the selectedItem elsewhere, you’ll have to access the properties directly.

    Going from simple to complex, you could try

    <s:Label text="{ cbSockOptions.selectedItem[cbSockOptions.labelField] }" />
    

    But I think you’ll get binding warnings if you do that because of the array accessor – and it is never good to cause warnings.

    A better idea would be to cast the selectedItem to the same type as the items in the collection created by TypeUtility.convertToCollection, e.g.

    <s:Label text="{ CompanyClassName( cbSockOptions.selectedItem ).propertyToDisplay }" />
    

    The best idea would be to use your cbSockOptions_changeHandler to set a local variable (e.g. selectedCompany) to use for binding. If your classes is Bindable, then you could just used the selectedCompany

    <s:Label text="{ selectedCompany.propertyToDisplay }" />
    

    otherwise if the class is not bindable, then you could just use another property to store the value

    <s:Label text="{ propertyToDisplay }" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I´m dynamically creating an instance of a class with reflection and this works fine,
I have a code for populating content for tabs dynamically. First time it works
Having issues with dynamically creating <select> tags and then populating them with XML values.
I have some WPF ListBox which is dynamically populating with items. Something like this
I am dynamically populating my page like this: <script type=text/html id=ContainerTemplate> <span data-bind=template: {
Newbie here! My problem is as follows: I have a dynamically populating ul where
Hi i am trying to create dropdownlists dynamically and populating the contents via an
Dynamically I want to edit/update hosts(etc/hosts) file to add domain. To edit hosts(etc/hosts) file
I want to dynamically create instance method of child class through class method of
I'm dynamically populating a select box with option values based on search results returned

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.