[REVIEW REQUEST] Add support for an emptyText property in ComboBox
richard.bair at oracle.com
Tue Feb 26 11:44:31 PST 2013
I would guess that the use case you're thinking of here would map to a value of "null", or would it map to some other arbitrary developer supplied value?
On Feb 21, 2013, at 5:39 AM, Werner Lehmann <lehmann at media-interactive.de> wrote:
> emptyText only works for empty lists? I have overlooked this before. Basically it is equivalent to
> promptText = items.isEmpty ? "empty" : "select something"
> I thought the combobox would always show the empty text (if specified), even when there are other items in the list. The usecase would be to explicitly show "no selection", and also to allow users to explicitly unselect.
> This is the primary usecase in my opinion... and it would be so useful to have this handled in the control:
> - always show it as first item regardless of sort order of other items
> - allow special styling to have it stand out from the rest
> - application does not have to copy items to another list just to add a special empty-element (plus special code to handle selection)
> In constrast, an "emptyPromptText" does not achieve that much... in my opinion.
> On 19.02.2013 01:39, Jonathan Giles wrote:
>> I'm keen to add an 'emptyText' property to ComboBox. This property would
>> be analogous to the 'promptText' property already supported, except that
>> it would appear in the popup list area when the items list is empty
>> (rather than in the text field when that is empty).
More information about the openjfx-dev