我很新,它是Vaadin,我不能做简单的绑定(我很有道理)
我有Person类,其中包含一些字段,例如Gender。 性别 - 它的典型java枚举。
fieldGroup.setItemDataSource ( new BeanItem<> ( person ) );
fieldGroup.setReadOnly ( true );
....
DateField field = new DateField ( "some_caption");
fieldGroup.bind ( field, "geenger"); //property - "gender" field (type - enum Gender)
他们我收到了一个例外:
Caused by: com.vaadin.data.util.converter.Converter$ConversionException: Unable to convert value of type model.Gender to presentation type class java.lang.String. No converter is set and the types are not compatible.
请与您分享如何解决问题的想法。