本文整理汇总了Java中com.vaadin.data.util.converter.Converter.ConversionException类的典型用法代码示例。如果您正苦于以下问题:Java ConversionException类的具体用法?Java ConversionException怎么用?Java ConversionException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConversionException类属于com.vaadin.data.util.converter.Converter包,在下文中一共展示了ConversionException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleUnparsableDateString
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* This method is called to handle a non-empty date string from the client
* if the client could not parse it as a Date. In the current case two
* different parsing schemas are tried. If parsing is not possible a
* ConversionException is thrown which marks the DurationField as invalid.
*/
@Override
protected Date handleUnparsableDateString(final String value) throws ConversionException {
try {
return durationFormat.parse(value);
} catch (final ParseException e1) {
try {
return additionalFormat.parse("000000".substring(value.length() <= 6 ? value.length() : 6) + value);
} catch (final ParseException e2) {
// if Parsing is not possible ConversionException is thrown
}
}
throw new ConversionException("input is not in HH:MM:SS format.");
}
示例2: setValueAsString
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValueAsString(String value, String parameterName)
throws ReadOnlyException, ConversionException, ParseException
{
SimpleDateFormat sdf = new SimpleDateFormat(parameterFormat);
DateField field;
if (parameterName.equalsIgnoreCase(startParameterName))
{
field = startfield;
}
else
{
field = endfield;
}
field.setValue(sdf.parse(value));
}
示例3: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(String newFieldValue) throws ReadOnlyException,
ConversionException {
super.setInternalValue(newFieldValue);
changeFieldValue(newFieldValue);
}
示例4: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(Tag newFieldValue) throws ReadOnlyException,
ConversionException {
super.setInternalValue(newFieldValue);
changeFieldValue(newFieldValue);
}
示例5: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(Boolean newFieldValue) throws ReadOnlyException,
ConversionException {
if (newFieldValue==null){
newFieldValue = false;
}
value = newFieldValue;
super.setValue(newFieldValue);
}
示例6: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(String newFieldValue) throws ReadOnlyException,
ConversionException {
if (newFieldValue==null){
newFieldValue = ConstanteUtils.TYP_BOOLEAN_NO;
}
value = newFieldValue;
super.setValue(newFieldValue);
}
示例7: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(LocalDate newFieldValue) throws ReadOnlyException,
ConversionException {
super.setValue(newFieldValue);
timeValue = newFieldValue;
setDateValue(newFieldValue);
}
示例8: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(String newFieldValue) throws ReadOnlyException,
ConversionException {
if (newFieldValue!=null){
field.setValue(new SimpleBeanPresentation(newFieldValue));
}
value = newFieldValue;
super.setValue(newFieldValue);
}
示例9: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(LocalDateTime newFieldValue) throws ReadOnlyException,
ConversionException {
super.setValue(newFieldValue);
timeValue = newFieldValue;
setDateTimeValue(newFieldValue);
}
示例10: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
/**
* @see com.vaadin.ui.AbstractField#setValue(java.lang.Object)
*/
@Override
public void setValue(LocalTime newFieldValue) throws ReadOnlyException,
ConversionException {
timeValue = newFieldValue;
setDateTimeValue(newFieldValue);
}
示例11: ProtoInvalidValueException
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
public ProtoInvalidValueException(final String message, final ConversionException exception)
{
super(message);
assert null != exception : "Parameter 'exception' of 'ProtoInvalidValueException''s ctor must not be null";
this.cnvrsExcep = exception;
LOGGER.error("Original conversion exception: '{}'", this.cnvrsExcep);
}
示例12: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
protected void setValue(Object newFieldValue, boolean repaintIsNotNeeded)
throws com.vaadin.data.Property.ReadOnlyException,
ConversionException, InvalidValueException {
super.setValue(newFieldValue, repaintIsNotNeeded);
}
示例13: setValueAsString
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValueAsString(String value, String parameterName)
throws ReadOnlyException, ConversionException, ParseException
{
SimpleDateFormat sdf = new SimpleDateFormat(parameterFormat);
if (parameterName.equalsIgnoreCase(startParameterName))
{
startfield.setValue(sdf.parse(value));
}
logger.warn("Trying to set end date for a one day date range, ignoring");
}
示例14: getOriginalConversionException
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
public ConversionException getOriginalConversionException()
{
return this.cnvrsExcep;
}
示例15: setValue
import com.vaadin.data.util.converter.Converter.ConversionException; //导入依赖的package包/类
@Override
public void setValue(T newFieldValue) throws com.vaadin.data.Property.ReadOnlyException, ConversionException
{
innerField.setValue(newFieldValue);
markAsDirty();
}