selectMany components swallow/forgets preselected disabled SeletItems
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
Consider this situation: you have a number of options and some options are already selected but must not be unselected. SelectItem allows to pass a disable item state and the item will be correctly rendered as checked but disabled. If some other options/checkboxes are enabled during decode only the submitted options will survive - the preselected disabled option will be lost since the disabled items checked state is not submitted.
I have a fix ready for that and also a test application - what's currently missing is the unit test for it, but I hope Manfred could help me out with that.
The change works like this: during rendering selected & disabled itemValues will be added to a Set that is maintained on the component attributes map with name "selectedDisabledItems". This Set, if existing, will be merged to the newValues[] array with the submitted values.
See attached changebundle.txt and the sources of the test bean and page.
Contributor guide
Research direction
Start with the attached changebundle.txt and the sources of the test bean and page mentioned in the issue, then locate the selectMany component unit-test area. Reproduce decoding with enabled options and preselected disabled items. Done means a test verifies that the preselected disabled values are preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100