org.apache.tapestry.internal.translator
Class ByteTranslator
java.lang.Object
org.apache.tapestry.internal.translator.ByteTranslator
- All Implemented Interfaces:
- Translator<Byte>
public class ByteTranslator
- extends Object
- implements Translator<Byte>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteTranslator
public ByteTranslator()
toClient
public String toClient(Byte value)
- Description copied from interface:
Translator
- 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).
- Specified by:
toClient in interface Translator<Byte>
- Parameters:
value - the server side value (which will not be null)
- Returns:
- client-side value to present to the user
getType
public Class<Byte> getType()
- Description copied from interface:
Translator
- Returns the type of the server-side value.
- Specified by:
getType in interface Translator<Byte>
- Returns:
- a type
parseClient
public Byte parseClient(String clientValue,
Messages messages)
throws ValidationException
- Description copied from interface:
Translator
- Converts a submitted request value into an appropriate server side value.
- Specified by:
parseClient in interface Translator<Byte>
- Parameters:
clientValue - to convert to a server value; this will not be null, but may be blankmessages - validator messages assembled by ValidationMessagesSource
- Returns:
- equivalent server-side value (possibly null)
- Throws:
ValidationException - if the value can not be parsed
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.