Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectMultiMenu initialise component with a list with space after comma. #923

Closed
gtstewart opened this issue Mar 12, 2018 · 1 comment
Closed
Assignees
Milestone

Comments

@gtstewart
Copy link

Not sure if this is considered a bug or inconsistent behaviour.
When initialising the String variable in the backing bean to a comma separated list before displaying the selectMultiMenu, requires that there not be a space after the comma otherwise the items after the first will not be pre-selected. ie the list must be "Item 1,Item 2,Item 3". This how the String variable would appear after selecting those three items from the list.
However the the selected items in the closed (not dropdown) selectMultiMenu are displayed with a space after the comma. ie the above list of selected items is displayed as Item 1, Item 2, Item 3
BootsFaces version 1.1.3
The problem was that I was displaying the variable elsewhere using an outputText component and was including the spaces to correctly format the text and it would not then work in the selectMultiMenu.

stephanrauh added a commit to TheCoder4eu/BootsFacesWeb that referenced this issue Jun 2, 2018
@stephanrauh
Copy link
Collaborator

The comma-separated list is a list of (internal) values, not of (user-readable) labels. So I consider the bug a mere inconsistency.

However, I also believe there's no harm in checking for spaces. It's only a fallback, so it's still possible to use values with leading or trailing spaces. I don't believe anybody does that, but still, it should be possible :).

I've uploaded a developer snapshot containing the bug fix to Maven Central. See #369 on how to get it.

@stephanrauh stephanrauh self-assigned this Jun 2, 2018
@stephanrauh stephanrauh added this to the v1.5.0 milestone Jun 2, 2018
@stephanrauh stephanrauh modified the milestones: v1.5.0, v1.3.0 Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants