| org.apache.tapestry.Translator
Translator | public interface Translator (Code) | | Translates between client-side and server-side values. Client-side values are always strings.
< Parameters: T - > |
Method Summary | |
T | parseClient(String clientValue, Messages messages) Converts a submitted request value into an appropriate server side value. | String | toClient(T value) Converts a server-side value to a client-side string. |
parseClient | T parseClient(String clientValue, Messages messages) throws ValidationException(Code) | | Converts a submitted request value into an appropriate server side value.
Parameters: clientValue - (possibly null or the empty string) Parameters: messages - validator messages assembled by ValidationMessagesSource equivalent server-side value (possibly null) throws: ValidationException - if the value can not be parsed |
toClient | String toClient(T value)(Code) | | 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. The output client value should be parsable by
Translator.parseClient(String,Messages) .
Parameters: value - the server side value (which may be null) client-side value to present to the user |
|
|