Binder should report the property name in binding error messages if available
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
- Vaadin version: 8.1.0.beta1, still exists in 8.3.2
If a developer makes name based binding, and it misses a converter, it can be hard for developer to find the right binding that should be fixed. Binder should included the name of the bound property in the error message if known. Especially nasty if there are multiple field type - editor type pairs of which some are configured.
An example to reproduce:
public static class Pojo {
private String stringValue;
private Double doubleValue;
public Double getDoubleValue() {
return doubleValue;
}
public String getStringValue() {
return stringValue;
}
public void setDoubleValue(Double doubleValue) {
this.doubleValue = doubleValue;
}
public void setStringValue(String stringValue) {
this.stringValue = stringValue;
}
}
TextField stringValue = new TextField();
TextField doubleValue = new TextField();
{
Binder<Pojo> binder = new Binder<>(Pojo.class);
binder.bindInstanceFields(this);
}
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
Start with Binder.bindInstanceFields using the Pojo and two TextField example from the issue, and reproduce the missing-converter binding error. The work is done when the error message includes the bound property name whenever that name is available, making the failing binding identifiable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100