9 Replies Latest reply on Jun 3, 2009 12:08 AM by yeti_bigfoot

    Combobox shows too many options

    yeti_bigfoot

      Using a combobox as an account selector widget in my Flex app.

       

      When closed/minimised the currently selected value is shown on the combobox, this is correct. When I click to view the list of options the list is fine except it includes currently selected item/label.

       

      So in effect the user would be able to re-select the currently selected label/item, does that make sense?!

       

      Is there an option/flag for the combobox to not display the currently selected item in the list shown under the control?

       

      The dataprovider is an ArrayCollection.

      The ArrayCollection gets populated by use of calls such as: ac.addItem("0123456789");

       

      Any pointers appreciated, only way I can otherwise think to do it wouldf be to write code to sort through currently selected items/remove from dataProvider/put back in on selection change. That doesn't seem quite 'proper'

        • 1. Re: Combobox shows too many options
          JeffryHouser Level 4

          Can you refer me to a UI precedent where the selected item is removed from the drop down?

           

          When the drop down is expanded on a Flex ComboBox with a selectedItem, the selectedItem is highlighted.  The user cannot select it again because it is already selected.

           

          If you parse the dataProvider to remove the selected Item, I believe the ComboBox will be reset to its default state [the unselected state if you're using a prompt or with selectedIndex = 0] without retaining the selection.  You cant select an item that isn't in the source list.  .

          1 person found this helpful
          • 2. Re: Combobox shows too many options
            yeti_bigfoot Level 1

            I hear you, but I'm afraid my boss doesn't

             

            I think he sees the currently select label in the textfield of the combobox as a second entry in the list.

            • 3. Re: Combobox shows too many options
              JeffryHouser Level 4

              Maybe you need to demonstrate some other ComboBoxes to your boss.  An HTML select box is one option.  I'm sure it won't take too long to find one in the operating system of his choice.

               

              Or you can extend the ComboBox to try to make it work the way he requests, but I doubt it'll be trivial.

              • 4. Re: Combobox shows too many options
                Ansury Level 3

                That would be a terrible design! What if you open the combobox list, look at the other options, and decide you want to keep the same selection? The only way to do so would probably be to click "anywhere outside of the component that isn't another component"--and I'm not even sure that would work.

                 

                Your boss is wrong, you'll have to explain that this is standard behavior and make an argument that it's more difficult to cancel out of making a change. It'll confuse users too if the list changes like that, I guarantee it.

                 

                You'd have to extend ComboBox to make it do this--and that may not even work. Who knows what methods or variables (that may be private) you'd have to mess with? Who know how many hours it would take? Even ignoring the bad design aspect, it's probably just not worth the time investment.  There is a chance it might be an easy change, but even in that case, the design is more important. 

                The code in most of these Flex components is not trivial at all...

                 

                Also, your boss is micromanaging and wrong to ask such a thing, unless he is the actual customer or at least the "owner" who's supposed to be representing the end user(s).

                • 5. Re: Combobox shows too many options
                  oldMster Level 3

                  Does your boss have pointy hair?

                  • 6. Re: Combobox shows too many options
                    JeffryHouser Level 4

                    Ansury,

                     

                    I tend to agree it would be a bad design choice due to consistency with what the userse are familiar with...

                     

                    However, after that your post seems particularly strongly worded, with a lot of assumptions which that may or may not be true.

                     

                    Until you try it, you have no idea how easy, or hard, it would be to modify the ComboBox like this.  I have no doubt it is possible, even though I doubt its practicality.

                     

                    I also don't see the bosses actions as wrong or micromanaging.  They may be, but we don't have enough information to judge.  I've had a lot of clients ask me 'stupid' things over the years and none of them were signs of micromanagement.

                    • 7. Re: Combobox shows too many options
                      Ansury Level 3

                      I am making a few assumptions true, but I think it's fairly obvious what those assumptions are. If not I can answer specific questions.

                       

                      I did say I'm not sure it'll be difficult, it might not be, but in my experience things like this are by far more often a big problem than they are an easy fix.

                       

                      I should have said his boss may be micromanaging-- I'm assuming they are operating as a manager rather than a customer there.  Obviously if all the requirements are coming directly from the boss, that's not the case!

                      • 8. Re: Combobox shows too many options
                        Flex harUI Adobe Employee

                        BTW, I haven't tried it, but maybe if you set variableRowHeight=true on the dropdown, a custom itemRenderer can shrink its height or otherwise change its visuals to make it less confusing to the "boss".  But the best way to solve these problems is with a usability test to see if the paying customers are confused or not.

                         

                        Another option would be a custom dropdown that clones the DataProvider and applies a filter to the clone.

                         

                        Alex Harui

                        Flex SDK Developer

                        Adobe Systems Inc.

                        Blog: http://blogs.adobe.com/aharui

                        • 9. Re: Combobox shows too many options
                          yeti_bigfoot Level 1

                          Many thanks for all the input guys.

                          Glad it's not just me that thinks it an odd request!

                           

                          I'll try to persuade him it's more work than nessecary to break a standard UI.

                           

                          (No the manager doesn't have pointy hair! Though it often feels like he should have!)