public interface Translator extends FormComponentContributor
ValidatableField
s to both format an object as text and translate
submitted text into an appropriate object for a given field.Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(IFormComponent field,
java.util.Locale locale,
java.lang.Object object)
Invoked during rendering to format an object (which may be null) into a text value (which
should not be null) appropriate for the specified field.
|
java.lang.Object |
parse(IFormComponent field,
ValidationMessages messages,
java.lang.String value)
Invoked during rewind to parse a submitted input value into an object suitable for the
specified component.
|
renderContribution
java.lang.String format(IFormComponent field, java.util.Locale locale, java.lang.Object object)
locale
- TODOjava.lang.Object parse(IFormComponent field, ValidationMessages messages, java.lang.String value) throws ValidatorException
messages
- TODOValidatorException
- if the specified text could not be parsed into an object.