[REVIEW] Restricting the ComboBox selection model to single selection
deep.blue.6802 at gmail.com
Sun Feb 5 01:15:07 PST 2012
A multi-selection combobox (referred to as a ListBox in Jonathan's
proposal) would only be available as a unique component (if there's enough
interest), and not an option or setting available from a single-selection
Thank for asking for a clarification.
>Not sure if you two are talking about the same thing. As I understand
>he wants to restrict combobox to singleselection, so it never will be
possible to have a
>multiselection combobox. Jeff, OTOH, assumes the option of a multiselect
On 2012-02-05 05:12, Jeff McDonald wrote:
> I support the proposal.
> The selection behavior should be different between a single selection and
> multiple selection ComboBox. With a single selection ComboBox the popup
> should disappear once an item is selected. A multi-selection ComboBox
> should allow multiple selections before disappearing. Being able to skin a
> single-selection ComboBox differently than a multi-selection ComboBox
> be a benefit as well. See Multi-choice
> is a Silverlight multi-selection component.
> On 03/02/2012 7:18 PM, Jonathan Giles wrote:
>> Hi all,
>> I'm asking for approval to change the API of the ComboBox
>> selectionModel property, from the more general SelectionModel class,
>> to the more specific SingleSelectionModel class. This enforces the
>> fact that the ComboBox, for now and evermore, will only support single
>> selection (much like the ChoiceBox control). Should multiple selection
>> ever be needed, a separate 'ListBox' control can be developed to more
>> aptly serve these needs.
>> The desire to make this change is, however, more due to the fact that
>> the current API does no one any favours. It misleads developers to
>> think that by installing a MultipleSelectionModel into the property,
>> they may be afforded some multiple selection functionality, which is
>> not true. This change makes it impossible for them to think this, as
>> compilation will fail in this case. I would argue that this is a bug
>> in the API, and one that should be fixed prior to being set in stone.
>> Not fixing this bug prior to shipping the ComboBox control will lead
>> to confusion and / or bug reports from developers expecting
>> The proposed patch is attached to the Jira issue. The changes are
>> minimal and, I would argue, as risk free as one can hope. It has no
>> impact on unit tests as there were no multiple selection tests
>> written, and I hope the same can be said for the automated tests.
More information about the openjfx-dev