From: Artur Signell Date: Thu, 22 Dec 2011 06:54:47 +0000 (+0200) Subject: Renamed getValueConversionError -> getConversionError that was missing X-Git-Tag: 7.0.0.alpha2~545^2~1^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb0016dc23686eebfc2cb412e933654d1381bb5a;p=vaadin-framework.git Renamed getValueConversionError -> getConversionError that was missing from an earlier commit. Also made javadoc more specific for getConvertedValue --- diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java index 3e75da5ae2..d67c553426 100644 --- a/src/com/vaadin/ui/AbstractField.java +++ b/src/com/vaadin/ui/AbstractField.java @@ -850,7 +850,7 @@ public abstract class AbstractField extends AbstractComponent implements return converter.convertToModel(fieldValue, getLocale()); } catch (com.vaadin.data.util.converter.Converter.ConversionException e) { throw new Converter.ConversionException( - getValueConversionError(converter.getModelType()), e); + getConversionError(converter.getModelType()), e); } } @@ -872,20 +872,18 @@ public abstract class AbstractField extends AbstractComponent implements if (type.isAssignableFrom(fieldValue.getClass())) { return fieldValue; } else { - throw new Converter.ConversionException( - getValueConversionError(type)); + throw new Converter.ConversionException(getConversionError(type)); } } /** - * Returns the value conversion error with {0} replaced by the data source - * type. + * Returns the conversion error with {0} replaced by the data source type. * * @param dataSourceType * The type of the data source * @return The value conversion error string with parameters replaced. */ - protected String getValueConversionError(Class dataSourceType) { + protected String getConversionError(Class dataSourceType) { if (dataSourceType == null) { return getConversionError(); } else { @@ -895,10 +893,12 @@ public abstract class AbstractField extends AbstractComponent implements } /** - * Returns the current field value converted to the data source type. + * Returns the current value (as returned by {@link #getValue()}) converted + * to the data source type. *

* This returns the same as {@link AbstractField#getValue()} if no converter - * has been set. + * has been set. The value is not necessarily the same as the data source + * value e.g. if the field is in buffered mode and has been modified. *

* * @return The converted value that is compatible with the data source type @@ -1030,7 +1030,7 @@ public abstract class AbstractField extends AbstractComponent implements getLocale()); } catch (Exception e) { throw new InvalidValueException( - getValueConversionError(getConverter().getModelType())); + getConversionError(getConverter().getModelType())); } }