@ThreadRestricted(value="wicket") public class WicPatternConverter extends Object implements IConverter<Pattern>
Constructor and Description |
---|
WicPatternConverter(int _maxInputLength)
Constructs a WicPatternConverter.
|
Modifier and Type | Method and Description |
---|---|
Pattern |
convertToObject(String input,
Locale _ignored) |
String |
convertToString(Pattern value,
Locale _ignored) |
int |
maxInputLength()
The maximum length of input that will be accepted.
|
protected Pattern |
patternFor(String value)
Compiles the pattern for a string value.
|
boolean |
setConvertedInputUnaltered(FormComponent<Pattern> component)
Sets the converted input to the model's current value and returns true; or, if
conversion is really needed, leaves it unset and returns false.
|
<C extends TextField<Pattern>> |
setMaxLength_Type(C field)
A convenience method to initialize a text field by adding a 'maxLength' attribute
to its view, and by setting a model type of Pattern.
|
public WicPatternConverter(int _maxInputLength)
maxInputLength()
public int maxInputLength()
convertToObject(String,Locale)
public final boolean setConvertedInputUnaltered(FormComponent<Pattern> component)
FormComponent.convertInput()
public <C extends TextField<Pattern>> C setMaxLength_Type(C field)
maxInputLength()
public final Pattern convertToObject(String input, Locale _ignored) throws IllegalArgumentException
convertToObject
in interface IConverter<Pattern>
IllegalArgumentException
- if input exceeds
maxInputLength()public final String convertToString(Pattern value, Locale _ignored)
convertToString
in interface IConverter<Pattern>
protected Pattern patternFor(String value) throws PatternSyntaxException
PatternSyntaxException