vaadin 8 migration, wip.
import com.vaadin.data.Converter;
import com.vaadin.data.converter.StringToBigDecimalConverter;
import com.vaadin.data.converter.StringToBigIntegerConverter;
+import com.vaadin.data.converter.StringToBooleanConverter;
import com.vaadin.data.converter.StringToDateConverter;
import com.vaadin.data.converter.StringToDoubleConverter;
import com.vaadin.data.converter.StringToFloatConverter;
} else if (Date.class.equals(typeOfProperty)) {
field = new TextField();
converter = new StringToDateConverter();
- } else if (Integer.class.equals(typeOfProperty)) {
+ } else if (Integer.class.equals(typeOfProperty) || "int".equalsIgnoreCase(typeOfProperty.getName())) {
field = new TextField();
converter = new StringToIntegerConverter("Input value should be an integer");
} else if (Float.class.equals(typeOfProperty)) {
} else if (Double.class.equals(typeOfProperty)) {
field = new TextField();
converter = new StringToDoubleConverter("Input value should be an double");
- } else if (Long.class.equals(typeOfProperty)) {
+ } else if (Long.class.equals(typeOfProperty) || "long".equalsIgnoreCase(typeOfProperty.getName())) {
field = new TextField();
converter = new StringToLongConverter("Input value should be an long");
} else if (BigInteger.class.equals(typeOfProperty)) {
} else if (BigDecimal.class.equals(typeOfProperty)) {
field = new TextField();
converter = new StringToBigDecimalConverter("Input value should be an bigdecimal");
+ } else if (Boolean.class.equals(typeOfProperty) || "boolean".equalsIgnoreCase(typeOfProperty.getName())) {
+ field = new TextField();
+ converter = new StringToBooleanConverter("Input value should be an boolean");
} else if (typeOfProperty.isEnum()) {
field = new TextField();
converter = new StringToEnumConverter();
