org.equanda.tapestry5.translators
Class TimestampTranslator
java.lang.Object
org.equanda.tapestry5.translators.TimestampTranslator
- All Implemented Interfaces:
- org.apache.tapestry5.FieldTranslator<Timestamp>, org.apache.tapestry5.Translator<Timestamp>
public class TimestampTranslator
- extends Object
- implements org.apache.tapestry5.Translator<Timestamp>, org.apache.tapestry5.FieldTranslator<Timestamp>
Tapestry translator for Timestamp values.
- Author:
- Joachim Van der Auwera
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimestampTranslator
public TimestampTranslator()
parseClient
public Timestamp parseClient(org.apache.tapestry5.Field field,
String clientValue,
String message)
throws org.apache.tapestry5.ValidationException
- Parses blank values to null, otherwise parses the client value to a Timestamp
- Specified by:
parseClient in interface org.apache.tapestry5.Translator<Timestamp>
- Throws:
org.apache.tapestry5.ValidationException - if the clientValue can not be parsed
toClient
public String toClient(Timestamp value)
- Converts null to the blank string, non-null to a string representation.
- Specified by:
toClient in interface org.apache.tapestry5.FieldTranslator<Timestamp>- Specified by:
toClient in interface org.apache.tapestry5.Translator<Timestamp>
getType
public Class<Timestamp> getType()
- Specified by:
getType in interface org.apache.tapestry5.FieldTranslator<Timestamp>- Specified by:
getType in interface org.apache.tapestry5.Translator<Timestamp>
getName
public String getName()
- Specified by:
getName in interface org.apache.tapestry5.Translator<Timestamp>
getMessageKey
public String getMessageKey()
- Specified by:
getMessageKey in interface org.apache.tapestry5.Translator<Timestamp>
render
public void render(org.apache.tapestry5.Field field,
String message,
org.apache.tapestry5.MarkupWriter markupWriter,
org.apache.tapestry5.services.FormSupport formSupport)
- Specified by:
render in interface org.apache.tapestry5.Translator<Timestamp>
parse
public Timestamp parse(String clientValue)
throws org.apache.tapestry5.ValidationException
- Specified by:
parse in interface org.apache.tapestry5.FieldTranslator<Timestamp>
- Throws:
org.apache.tapestry5.ValidationException
render
public void render(org.apache.tapestry5.MarkupWriter markupWriter)
- Specified by:
render in interface org.apache.tapestry5.FieldTranslator<Timestamp>
Copyright © 2007-2009. All Rights Reserved.