public interface NumericTranslatorSupport
ThreadLocale
to determine the locale for any locale-specific operations.Modifier and Type | Method and Description |
---|---|
<T extends Number> |
getMessageKey(Class<T> type)
Returns the default message key for parse failures for the indicated type.
|
<T extends Number> |
parseClient(Class<T> type,
String clientValue)
Parses a client-submitted value in a localized manner.
|
<T extends Number> |
setupTranslation(Class<T> type,
Element element,
String message)
Adds client-side format validation for the field, appropriate to the indicated type.
|
<T extends Number> |
toClient(Class<T> type,
T value)
Converts a server-side value to a client-side string.
|
<T extends Number> T parseClient(Class<T> type, String clientValue) throws ParseException
T
- type
- desired type of valueclientValue
- value from client; this will be trimmed of leading/trailing whitespaceParseException
Translator.parseClient(org.apache.tapestry5.Field, String, String)
<T extends Number> String toClient(Class<T> type, T value)
T
- type
- type of value to convertvalue
- current (non-null) value<T extends Number> String getMessageKey(Class<T> type)
T
- type
- <T extends Number> void setupTranslation(Class<T> type, Element element, String message)
type
- value typeelement
- message
- message if the client-side value can't be parsed as a number5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.