List of usage examples for org.apache.wicket.util.convert ConversionException setTargetType
public final ConversionException setTargetType(final Class<?> targetType)
From source file:org.artifactory.common.wicket.component.checkbox.styled.StyledCheckbox.java
License:Open Source License
private static Boolean toBoolean(String[] value) throws ConversionException { String tmp = value != null && value.length > 0 ? value[0] : null; try {//from w w w . jav a2 s .com return Strings.toBoolean(tmp); } catch (StringValueConversionException e) { final ConversionException conversionException = new ConversionException( String.format("Invalid boolean input value posted \"%s\"", tmp), e); conversionException.setTargetType(Boolean.class); throw conversionException; } }