crudui icon indicating copy to clipboard operation
crudui copied to clipboard

ClassCastException

Open alabotski opened this issue 2 years ago • 3 comments

Hi my DTO

public class Product extends AuditableEntity {
...
  private Integer atn;
...
}

And CrudFormFactory

public class ProductFormFactory extends DefaultCrudFormFactory<Product> {
  public ProductFormFactory() {
    super(Product.class);
...
    setFieldType(Product.Fields.atn, IntegerField.class);
...
  }

But I have error

Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap') at com.vaadin.flow.component.textfield.AbstractNumberField.setValue(AbstractNumberField.java:40) at com.vaadin.flow.data.binder.Binder$BindingImpl.lambda$convertAndSetFieldValue$4(Binder.java:1441) at com.vaadin.flow.data.binder.Binder$BindingImpl.execute(Binder.java:1532) ... 136 common frames omitted

alabotski avatar May 20 '22 11:05 alabotski