Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

HAL-1061 Add ability to ignore an empty item in ComboItem #7

Merged
merged 1 commit into from Mar 18, 2016

Conversation

spyrkob
Copy link

@spyrkob spyrkob commented Mar 15, 2016

@hpehl
Copy link
Member

hpehl commented Mar 17, 2016

Thanks for the PR. I would suggest to turn the setter into a second constructor signature to specify whether this combobox allows empty values or not. IMO it's something which should be set at construction time but cannot be changed later on.

public ComboBoxItem(String name, String title) {
    this(name, title, true);
}

public ComboBoxItem(String name, String title, boolean allowEmpty) {
    super(name, title);
    this.allowEmpty = allowEmpty;
    ...
}

I'm going to merge the remaining HAL PRs once this PR is merged.

@spyrkob
Copy link
Author

spyrkob commented Mar 18, 2016

I added the constructor, but didn't change the field name. "allowEmpty" seems a bit misleading - if there's an empty item in the values collection, this will not prevent it from being displayed. Let me know if that's OK.

hpehl added a commit that referenced this pull request Mar 18, 2016
HAL-1061 Add ability to ignore an empty item in ComboItem
@hpehl hpehl merged commit 5659eb0 into hal:master Mar 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants