Interface FieldTranslator<T>

  • All Known Implementing Classes:

    public interface FieldTranslator<T>
    A wrapper around Translator that combines the translator for a specific Field and (sometimes) an override of the default validation message (used when an input value can't be parsed).
    • Method Detail

      • getType

        Returns the type of the server-side value.
        a type
      • parse

        T parse​(java.lang.String input)
         throws ValidationException
        Invoked after the client-submitted value has been translated to check that the value conforms to expectations (often, in terms of minimum or maximum value). If and only if the value is approved by all Validators is the value applied by the field.
        ValidationException - if the value violates the constraint
      • toClient

        java.lang.String toClient​(T value)
        Converts a server-side value to a client-side string. This allows for formatting of the value in a way appropriate to the end user.
        value - the server side value (which will not be null)
        client-side value to present to the user
        See Also: