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

UISelectMany collectionType ignored when VE resolves to non-Collection #5427

Closed
BalusC opened this issue Mar 26, 2024 · 0 comments
Closed

UISelectMany collectionType ignored when VE resolves to non-Collection #5427

BalusC opened this issue Mar 26, 2024 · 0 comments
Milestone

Comments

@BalusC
Copy link
Contributor

BalusC commented Mar 26, 2024

https://stackoverflow.com/q/78214508

This,

private Map<String, List<Entity>> entitiesByKey;
<h:selectManyCheckbox value="#{bean.entitiesByKey[key]}" collectionType="java.util.ArrayList">

isn't working because VE resolves to java.lang.Object instead of to an instance of java.util.Collection.

When VE resolves to java.lang.Object while collectionType is explicitly mentioned, it should be used to create the Collection instance rather than defaulting to an Object[]. Currently, the collectionType is unexpectedly ignored when VE resolves to java.lang.Object.

BalusC added a commit that referenced this issue Mar 30, 2024
Fix #5427 UISelectMany collectionType ignored when VE resolves to non-Collection
BalusC added a commit that referenced this issue Mar 30, 2024
@BalusC BalusC closed this as completed in acbdf4c Mar 30, 2024
BalusC added a commit that referenced this issue Mar 30, 2024
@BalusC BalusC added this to the 4.0.7 milestone Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant