ComboBox throws ReadOnlyException in case of change value during some long request
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Originally by artamonov
I have button that performs some long operation and ComboBox. Button sets readonly true to ComboBox and performs long operation synchronously. During operation user can change value of ComboBox, in this case ReadOnlyException will be thrown.
If I use TextField instead of ComboBox then this case works fine. I have compared source code of AbtractTextField#changeVariables and ComboBox#changeVariables, there is additional check for !isReadOnly in AbstractTextField:185
if (variables.containsKey("text") && !isReadOnly()) {
I have tried this check with our custom ComboBox and this works fine. TestUI attached.
Steps to reproduce:
Click on Test button
Long request will start
Click on ComboBox drop down button (may be twice)
Select new value
Red indicator with ugly stacktrace on ComboBox will be shown
Imported from https://dev.vaadin.com/ issue #19238
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare ComboBox#changeVariables with AbstractTextField#changeVariables, focusing on the read-only handling described in the issue. Reproduce the case with the attached TestUI by starting the long request and changing the ComboBox; done means the interaction no longer produces a ReadOnlyException or red error indicator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100