|
||||||||||
| 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(java.lang.Class<T> type,
Field field,
java.lang.String message)
Adds client-side format validation for the field, appropriate to the indicated type. |
|
|
getMessageKey(java.lang.Class<T> type)
Returns the default message key for parse failures for the indicated type. |
|
|
parseClient(java.lang.Class<T> type,
java.lang.String clientValue)
Parses a client-submitted value in a localized manner. |
|
|
toClient(java.lang.Class<T> type,
T value)
Converts a server-side value to a client-side string. |
|
| Method Detail |
|---|
<T extends java.lang.Number> T parseClient(java.lang.Class<T> type,
java.lang.String clientValue)
throws java.text.ParseException
T - type - desired type of valueclientValue - value from client; this will be trimmed of leading/trailing whitespace
java.text.ParseExceptionTranslator.parseClient(org.apache.tapestry5.Field, String, String)
<T extends java.lang.Number> java.lang.String toClient(java.lang.Class<T> type,
T value)
T - type - type of value to convertvalue - current (non-null) value
<T extends java.lang.Number> java.lang.String getMessageKey(java.lang.Class<T> type)
T - type -
<T extends java.lang.Number> void addValidation(java.lang.Class<T> type,
Field field,
java.lang.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 | |||||||||