My ComboBox does not work if I hardcode the dataProvider, not if the dataProvider of the remote object

I have a ComboBox where the user can select a category of products to display. The ComboBox control is sitting on a custom component and the ArrayCollection collection that fills created in the same element that displays the list.

I have two versions of the element containing the ComboBox control.

Version 1:

/ / Create new variable as ArrayCollection collection tuped

        [Bindable]

private var categoryList:ArrayCollection;

/ / initData method called on creationComplete

private function initData():void{ }

/ / set values in the ArrayCollection collection

categoryList = new ArrayCollection([ )

            "All Categories"

                  , "Appetizers"

            , "Butchery"

            , 'Candy & chocolate'

            , "Desserts"

            , 'Fruit & jam'

            , 'Gifts'

            , 'Grill & barbecue'

            , 'Honey and syrup'

            , 'Kitchen accessories'

            , "Little daviet Childrens Fun Food"

            , 'Denounced & other oils'

            , 'Oives & olive products'

            , « Pasta »

            , "Paste & fish"

            , 'Rice and cereal'

            , 'Sauces'

            , "Seasonings and Condiments"

            , 'Spreads'

            , "Truffles and mushrooms"

            , 'Vegetables'

            , 'Vinegar'

            ]);

/ / make this collection the data provider for catCombo

catCombo.dataProvider = categoryList.

        }

Version 2 (the result of a call to a ColdFusion cfc):

/ / Create new variable as ArrayCollection collection tuped

        [Bindable]

private var categoryList:ArrayCollection;

private function categoryListHandler(event:ResultEvent):void{ }

categoryList = event.result as ArrayCollection; collection

var catObj:Object = new Object();

catObj.merchantCategory = 'all categories'

categoryList.addItemAt (catObj, 0);

catCombo.dataProvider = categoryList.

        }

Everything else is identical in both versions of the custom component. The ComboBox is created like this:

" < mx:ComboBox id ="catCombo"rowCount ="16"" "

      styleName = " " glass "

Exchange = "dispatchFilter (); »

" labelField ="merchantCategory"" "

      / >

In both cases, catCombo is filled correctly. But...

In version 1, when I select a different category, everything works as expected.

In version 2, when I change the category, said filter "0 selected items" and nothing appears, even if I go back to "all categories". It's as if the filter sees nothing once there is a change in the selection of catCombo.

Of course, I would prefer Version 2 because the catalog - and its categories - change in the month.

So gurus, I would really like to start the new year with Version 2 of work, any ideas would be great appreciated. Everyone in the mood?

Happy new year

Carlos

This code populates the combo very well box.

I do not use a VO, or CFusion if... the thing with VO, I think it is we can do a selectedItem live on it because it is as [object], [object] you need actually to extrapolate this information or make it. toString();

You have drawn to see what is selected when you select an item in the drop-down list? is this [object], [object]...

I guess the cheapo to do would be to only capture the drop-down list box in a variable.

So have the right filter for the variable that will be given, rather than the filter directly from the drop-down list box?

It is quite difficult to the bug with all the code enough before you, but when you are only provided only a snippet of the code it makes it even harder.

Tags: Flex

Similar Questions

  • ComboBox does not send keyboard and no event click the menu drop-down.

    I use a ComboBox to search in my application. The application is a periodic table, then the user will be able to search by name of element, atomic number or a symbol. The ComboBox control is working very well, I just have two questions that I was wondering if someone could lead me in the right direction. The first problem is that, when a user clicks the ComboBox for a search entry, the keyboard does not dispatch. The user must use the native swipe gesture to display the keyboard. This isn't a huge problem, but I would really like to work for when the user clicks the ComboBox keyboard is distributed. IV ' e looked in this and concluded that it should work, ComboBox with a property TextInput keyboard should appear, but it doesn't. I also discovered that it is impossible to show/hide the keyboard with the code. I use FB 4.5 and 4.5 Flex and the most recent SDK Tablet from BlackBerry. Y at - it a bug or something?

    Also my other question is once the user starts typing in the search, the filter works great and the drop down displays all of the possibility. But my only problem is the user cant just click and the item in the drop-down menu. For example when the user types "A" all items that begin with a show upward in the drop down menu. The user cannot click on an element. The only way that the element can be selected is if the user continues typing the word until it is highlighted as the only option and then enter hits. This too is not a huge problem, but I like it to work so that if the user types 'A' they can do scroll down the menu and select the item they want. IV also looked into this and can't seem to find anyway to drop down the combobox list have a click event. I'll put a code later that you can see what I mean better, but for now its kind of a general questions. I use FB 4.5 version release and flex 4.5 with the new SDK of BBT. If someone can point me in the right direction, or send me any article that would be GREAT. Thanks in advance!

    It is probably easier than you think:

    1. Create a text input control
    2. Add event listeners when the control is changed ('change')
    3. Maintain an internal table of valid matches
    4. On the change event listener, browse each item and make a match that makes sense.  For example, to cut spaces beginning and end and do a string comparison of tiny out based on the length of a text entry field.  For example, if the user types "vel", which would correspond to "Developer" and "velcro".
    5. Create a list control that is displayed once the person begins to type.  Place it under the control of text entry.  Use the local to global changes in coordination and the size of the width of the list of the same width of the text input.
    6. # 4, dump all the data of the list data provider and add items to it based on string matching.  If no match or the text input text is empty/void/null, do not show the list.
    7. If the user selects an item in the list, hide the list, enter the selection to text entry and then send an event that the entry is "finished".
    8. Listen to the event "full" text of entry to perform what you wanted.

    Of course, if anyone can suggest how to get the Combox to work, go ahead.  I have just a habbit to create controls to achieve the appearance and the behavior I'm looking for.

    Good luck.

  • Vertical ComboBox does not show the label of the selected element of the sound

    Hello

    We created a custom vertical ComboBox.

    Normal ComboBox underwent a rotation of-90 degrees.

    It aims to show the label selected and open the menu to clean x, the coordinate y.

    To open the menu to the right x, y, we have replaced 'downArrowButton_buttonDownHandler' function to move the drop-down list accordingly.

    However, the selected label is not visible on the screen. Rotated text does not appear without embedding fonts. So we tried to embed fonts for the same. It work well.

    Help, please.

    Kind regards

    TANU

    I think you should try integrating "BOLD" to the police version, or

    set the combobox control to display its label in normal fontWeight

  • Click the ComboBox does not not in firefox

    Combobox mouse click does not work in firefox. Check in this link:

    http://livedocs.Adobe.com/Flex/2/langref/MX/controls/ComboBox.html

    Any idea?

    The ComboBox works for me with firefox 2.0.0.5, Flash Player 9.0.47.0. You are using an older version?

    Vygo

  • ComboBox does not properly

    Hello

    I developed a small application Flash (AS2), using Flash CS3 and have encountered a problem with the ComboBox component.

    I load another movie in the main movie with the following code:

    container var _level0.createEmptyMovieClip = ("ui_slider", _level0.getNextHighestDepth ());
    trace ("on the last image");
    container.loadMovie("ui-sliderv2.swf");
    ui_slider._x = 60;
    ui_slider._y =-382

    everything works fine, but none of the comboBoxes work. I can see the first item that can be selected, but the selection of the menu drop-down does not work. Nothing happens when I click it.

    the film of ui - sliderv2.swf works as expected when run on its own.

    Here are links to the SWF file.

    http://www.RMP-consulting.com/chomonicx/Chomonicx.html

    SWF menu on its own:
    http://www.RMP-consulting.com/chomonicx/UI-sliderv2.html

    Any suggestions?

    applying _lockroot = true so that the SWF file is loaded into the clip.

  • ComboBox does not display an element selected when the masking

    Hi all

    I have a combobox in the layer that lies beneath the mask (layer mask). It does not display an element selected in particular in the chrome browser (version 14)

    When click the combobox drops down and display items, but when making the specific item selected, it does not appear.

    Please help me solve this problem

    Vishal parekh

    Embed your fonts of textField comboboxes.

  • Drop down menus on comboboxes, does not update correctly

    I had this problem for some time - the comboboxes in my Flex 4 application will not change to match the comboboxes dataproviders.  In other words, when a dataprovider for a ComboBox drop-down list of the combobox can always show the latest dataprovider data.  This problem is intermittent and inconsistent.  It also seems to be a problem for the itemrenderer comboboxes, inside the datagrids, when the datagrids are sorted, or when the datagrids dataproviders are changed.

    I tried to do various invalidate methods / validateNow() on the comboboxes and does not update the drop-down lists.

    Any help will be greatly appreciated

    It is a known problem in the 3.5 SDK.  I thought it was fixed for 4.0 front

    We have shipped.

  • Windows Media Center does not recognize an Entone Hydra box/remote control cable

    I'm putting in place the WMC to work with my cable box Entone. It's not satellite, this is the area used by CCC Southslope in Eastern Iowa. There is no section Entone for activation of the box, automatic remote recognition does not take into account. When I try to teach my cable remote codes manually it will "key to continue" but never moves from the teaching of the 1 button for button 2.  I am sure that the IR receiver works and is properly plugged in, and that the batteries in the remote are fresh.

    Make sure the distance between the IR receiver and the remote control is quite close, there are no obstacles between the two and the whole set up is not under the direct fluorescent light.

    I'm going to suggest you go through the following article: -.

    How to use the functionality of Microsoft MCE Remote control learning

  • ComboBox does not work when placed on Movieclip

    I am doing a combobox with actionscript in a movieclip, everything works except when I try to open the drop-down list, this only works when there is nothing else under the drop-down list. so I guess there is a problem with the depth of the list or something.
    But I search a solution for 4hours now and can't seem to find it! Can someone help me?


    Greetz

    Yes indeed, I posted it on another forum as well and they suggested to place the combobox control in a new movieclip then use yourMCName._lockroot = true;

    It worked for me! Good luck

  • ComboBox does not

    In my application drop-down list boxes will not fill. They display the first point label, but only the first. They highlight as usual when you hover over and change color when clicked that usuall... just not of values. If I put a value for the prompt attribute, it displays this value, but not others.

    I use modules for the first time in this app, but don't know if that has anything to do with it. Combos are include in this way for all instances of all modules.

    Interestingly, integrated into the RichTextEditor drop-down list boxes are also not working not (combos of face and the size of the fonts).

    If anyone has any suggestions, I would appreciate it!

    Apparently there is a bug to know:
    https://bugs.Adobe.com/jira/browse/SDK-13152

    Difficulty is in the comments

  • my headphones (or headsets) does more work when plugged into the audio input jack

    I have a 2010 27-in. iMAC.   I am running Yosemite 10.10.5.   Recently I can't get audio on the audio jack that I always used with my helmet.  Have tried the other sons of contact as well as the apple earbuds.  Audio is great internal speakers.

    When you plug your earphones sound still come through the internal speakers?

    When you plug in your headphones, you see those as an option in preferences-> sound-> release system?

  • Error: "an authentication error has occurred. The security package does not exist", while trying to office remotely on Windows 7

    HI am kouadio.

    Then connect to remote desktop of my PC giving credentials he strikes me an error like

    "An authentication error has occurred. There is no such thing as the security package.

    Please can someone help me and tell me the solution for this.

    Thank you

    Kouadio

    Original title: Remote Desktop error

    Hi Steve,.

    Provide us additional information to help you better with this issue:

    1. You did changes to the operating system before this problem?
    2. Your device is connected on a network domain or a Windows Server?
    3. Exactly how you try to access the remote desktop?

    If your device is connected to a domain network / server Windows, please post your request in the sub forums. We have a dedicated team for help you with this problem.

    Forums TechNet Windows 7

    Otherwise, you can view the Microsoft Help article below and check if it helps.

    Connect to another computer using Remote Desktop connection

    It will be useful. Get back to us with an updated status of the connection to the remote desktop, we will be happy to help you.

    Thank you.

  • The mouse does not work in Remote Desktop

    I have a Win 7 64 bit Pro computer desktop that I try to run Remote Desktop to connect to my server Windows Home Server 2011. When I log in, my server's desktop is visible and I can see and move my mouse but when I left click of the mouse, nothing happens. Then if I click right, menu contextual office does not, but it is in the lower left corner, whenever I do a right-click No matter where I click. When the context menu displays and I hover over an element, it is not derivative of blue as it should. So basically just mouse doesn't work at all on the remote desktop.  However, the keyboard works.  I can click on the Windows key to bring up the menu start and use the arrow keys to navigate in it.

    Everything works fine on the server if I connect directly into it with the mouse and keyboard. I should also mention that exactly the same thing happens if I try to use remote desktop to connect to my Win 7 notebook Home Premium 64 - bit on my Windows 7 Pro Office above.

    And finally, if I use remote desktop to connect from my laptop or desktop to my Win XP Pro system at work, everything works perfectly fine. So is this something with the connection to a system Win 7 or WHS 2011? Any help appreciated. Thank you.

    I thought about it.  I had this program that runs on the server that reverses the mouse.  This is necessary, since I use a trackball turned 180 degrees for better comfort and "sakasa" mouse to use for the release of the mouse.  But I didn't need on the server and the system office.

  • POI does not work when FilePath changed

    Hello

    I use POI to read data from an Excel spreadsheet.
    However, I have a problem, when I put [FilePath = ExpandPath (".")] (/ tata/mywkbk.xls»)], the program reads the map correctly. Here the .cfm page read the file and the Excel file is in the same folder.

    But I want to change the FilePath [FilePath = ExpandPath (".)] C:/Tata/mywkbk.xls")], it does not work. I get the error "object instantiation Exception."

    Do the .cfm and the need to Excel to be in the same folder root for the POI to work?

    Can someone help me with this one?


    Here is a sample of my code:

    ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------


    <!-create an instance of the POIUtility.cfc. ->
    < cfset objPOI = CreateObject)
    "component."
    "POIUtility.
    ). Init()
    / >


    <!--
    Read excel sheet. ->
    < cfset arrSheets = objPOI.ReadExcel)
    FilePath = ExpandPath (".") ("/ Auntie/mywkbk.xls '),
    HasHeaderRow = true
    ) / >


    ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------

    You need not use ExpandPath. "C:/tata/mywkbk.xls" is already an absolute path.

    FilePath = "C:/tata/mywkbk.xls."
    ...

  • Simple rollover on the master page does not not on other pages

    I have a prototype with a master page and two regular pages. On the master page, I created two buttons for navigation to the other two pages. They have been decided, and I added a Simple rollover behavior that works when I have the selected master page and use the Preview button. However, with one of the other two selected pages, the reversal does not work in preview mode or when you preview in a browser.

    Am I missing something that would cause does it work?

    Hello:
    The second State in the forecast page must contain rollovers, which
    Currently, it doesn't.

    Add a State more to the page, and then put it between the invisible and
    Visible States.

    You change your behavior to the pop up screen on this page.
    Get an overview of all the pages in the browser were not protesting the pop-up for me,
    but when I exported as html and images, things functioned as expected.

    HTH

    jcbluesman wrote:
    > Thank you, Dorin. ( http://idisk.mac.com/jconstant-Public/forecast_prototype.png)
    >
    > The two buttons, with which I am fighting are the Preferences button and enter EPS

    --
    Jim Babbage-. : Community MX:. &. : Adobe Community Expert:.
    http://www.communityMX.com/
    CommunityMX - free resources:
    http://www.communitymx.com/free.cfm
    ---
    . : Fireworks adobe community expert:.
    Adobe Community Expert
    http://tinyurl.com/2a7dyp
    ---
    . : Author:.
    Lynda.com - http://movielibrary.lynda.com/authors/author/?aid=188
    Peachpit Press-
    http://www.Peachpit.com/authors/bio.aspx?a=d98ed798-5ef0-45A8-a70d-4b35fa14c9a4
    Layers Magazine - http://www.layersmagazine.com/author/jim-babbage

Maybe you are looking for