-
Notifications
You must be signed in to change notification settings - Fork 164
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
Give hint about missing null representation in error message #6757
Conversation
A binding doesn't have an automatic null representation configured if a converter is also defined. This may cause surprises with fields that don't accept null values, e.g. TextField. The easiest fix in this situation is to explicitly define a null representation. This patch adds an error message that reminds the developer about the existence of that feature so that they wouldn't have to make more elaborate workarounds. Fixes #6746
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)
flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java, line 1221 at r1 (raw file):
%s
quote it please . Sometimes it's hard to distinguish a proper name in the sentence.
Quotes helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)
flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java, line 1221 at r1 (raw file):
Previously, denis-anisimov (Denis) wrote…
%s
quote it please . Sometimes it's hard to distinguish a proper name in the sentence.
Quotes helps.
Isn't it clear enough without quotes when using the fully qualified name (getName()
) instead of the simple name (getSimpleName()
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained
flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java, line 1221 at r1 (raw file):
Previously, Legioth (Leif Åstrand) wrote…
Isn't it clear enough without quotes when using the fully qualified name (
getName()
) instead of the simple name (getSimpleName()
)?
Ah, right. It's getName
not a simple name. My imagination .....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all discussions resolved, 1 of 1 LGTMs obtained
Addresses: #9000 Addresses: #11109 These changes are adopted from vaadin/flow#4138 and vaadin/flow#6757
A binding doesn't have an automatic null representation configured if a converter is also defined. This may cause surprises with fields that don't accept null values, e.g. TextField. The easiest fix in this situation is to explicitly define a null representation. This patch adds an error message that reminds the developer about the existence of that feature so that they wouldn't have to make more elaborate workarounds. Fixes #6746 (cherry picked from commit 3e30650)
A binding doesn't have an automatic null representation configured if a converter is also defined. This may cause surprises with fields that don't accept null values, e.g. TextField. The easiest fix in this situation is to explicitly define a null representation. This patch adds an error message that reminds the developer about the existence of that feature so that they wouldn't have to make more elaborate workarounds. Fixes #6746 (cherry picked from commit 3e30650)
A binding doesn't have an automatic null representation configured if a converter is also defined. This may cause surprises with fields that don't accept null values, e.g. TextField. The easiest fix in this situation is to explicitly define a null representation. This patch adds an error message that reminds the developer about the existence of that feature so that they wouldn't have to make more elaborate workarounds. Fixes #6746 (cherry picked from commit 3e30650)
A binding doesn't have an automatic null representation configured if a converter is also defined. This may cause surprises with fields that don't accept null values, e.g. TextField. The easiest fix in this situation is to explicitly define a null representation. This patch adds an error message that reminds the developer about the existence of that feature so that they wouldn't have to make more elaborate workarounds. Fixes #6746 (cherry picked from commit 3e30650)
* Cherry picks of Binder fixes in Flow Addresses: #9000 Addresses: #11109 These changes are adopted from vaadin/flow#4138 and vaadin/flow#6757
A binding doesn't have an automatic null representation configured if a
converter is also defined. This may cause surprises with fields that
don't accept null values, e.g. TextField.
The easiest fix in this situation is to explicitly define a null
representation. This patch adds an error message that reminds the
developer about the existence of that feature so that they wouldn't have
to make more elaborate workarounds.
Fixes #6746
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)