|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NumericTranslatorSupport
Used to generate the client-side JSON specification for how a number-based validator operates. Uses ThreadLocale
to determine the locale for any locale-specific operations.
Method Summary | ||
---|---|---|
|
addValidation(Class<T> type,
Field field,
String message)
Adds client-side format validation for the field, appropriate to the indicated type. |
|
|
getMessageKey(Class<T> type)
Returns the default message key for parse failures for the indicated type. |
|
|
parseClient(Class<T> type,
String clientValue)
Parses a client-submitted value in a localized manner. |
|
|
toClient(Class<T> type,
T value)
Converts a server-side value to a client-side string. |
Method Detail |
---|
<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 whitespace
ParseException
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 addValidation(Class<T> type, Field field, String message)
T
- type
- value typefield
- field to which validation should be addedmessage
- message if the client-side value can't be parsed as a number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |